Load relevant packages
pacman::p_load(tidyverse,
ggstream,
flextable,
bibliometrix,
bib2df,
circlize,
patchwork) # p_load() will install packages if they are not installed already
set.seed(123)
Import data
# Import survey data
raw_data <- read_csv("Data/extracted_data_cons_phys_life_stages.csv")
# Remove spaces in column names
colnames(raw_data) <- gsub(" ", "_", colnames(raw_data))
Data cleaning
# Fix some typos, titles swapped with the reference information, or missing publication years
data <- raw_data
data$Short_reference[data$Short_reference == "Illing_et_al_2029"] <- "Illing_et_al_2020"
data$Short_reference[data$Short_reference == "Shartau_et_al_2002"] <- "Shartau_et_al_2016"
data$Short_reference[data$Short_reference == "Abdelqader_and_Al-Fataftah"] <- "Abdelqader_and_Al-Fataftah_2014"
data$Short_reference[data$Short_reference == "Wiedenova_et_al_"] <- "Wiedenova_et_al_2018"
data$Short_reference[data$Short_reference == "Radugina_and_Grigoryan"] <- "Radugina_and_Grigoryan_2018"
data$Short_reference[data$Short_reference == "Acute thermal stress and endotoxin exposure modulate metabolism and immunity in marine mussels (Perna canaliculus)"] <- "Muznebin_et_al_2022"
data$Title[data$Short_reference == "Muznebin_et_al_2022"] <- "Acute thermal stress and endotoxin exposure modulate metabolism and immunity in marine mussels (Perna canaliculus)"
data$Short_reference[data$Short_reference == "Heat stress is associated with disruption of ion balance in the migratory locust, Locusta migratoria"] <- "O'Sullivan_et_al_2017"
data$Title[data$Short_reference == "O'Sullivan_et_al_2017"] <- "Heat stress is associated with disruption of ion balance in the migratory locust, Locusta migratoria"
data <- data %>% filter(Title != "Physiological correlates of symbiont migration during bleaching of two octocoral species")
data$Title[data$Title == "Physiological correlates of symbiont migration during bleaching of two octocoral species Katharina"] <- "Physiological correlates of symbiont migration during bleaching of two octocoral species"
# Remove duplicates
data %>% group_by(Title) %>% summarise(n=n()) %>% filter(n>1) # Check if any title is duplicated
## # A tibble: 2 × 2
## Title n
## <chr> <int>
## 1 Control of lung ventilation following overwintering conditions in bullf… 2
## 2 The importance of thermal history: costs and benefits of heat exposure … 2
data <- data %>% distinct(Title, .keep_all = TRUE) # Remove duplicate
# Create a column for publication year
data <- data %>%
mutate(Publication_year = as.integer(str_extract(Short_reference, "\\d{4}")))
# Rename columns
data <- rename(data,
Life_stage_exposed = Life_stage_exposed_to_the_stressor,
Life_stage_tested = Life_stage_of_the_animals_when_traits_were_measured)
# View Trait categories
#View(data.frame(table(raw_data$Trait_category)))
# Delete and rename some observations for trait categories
data <- data %>%
filter(Trait_category != "Biomechanics",
Trait_category != "micro RNA expression") %>%
mutate(Trait_category = case_when(
Trait_category == "Resting membrane potential" ~ "Energetics and metabolism",
Trait_category == "DNA damage" ~ "Immune function and stress physiology",
Trait_category == "Energetics and metabolism, Haematology" ~ "Energetics and metabolism, Cardiovascular physiology",
Trait_category == "Energetics and metabolism, Osmoregulation, FLIGHT ACTIVITY, ALLOMETRIC MEASURES, Cuticular hydrocarbons,AKH-related gene expression variations" ~ "Energetics and metabolism, Osmoregulation",
Trait_category == "Environmental tolerance and preference, Cardiovascular physiology, Respiratory physiology" ~ "Environmental tolerance and preference, Cardiovascular physiology, Energetics and metabolism",
Trait_category == "Environmental tolerance and preference, Clearance (feeding) rate" ~ "Environmental tolerance and preference",
Trait_category == "Environmental tolerance and preference, Development, Acclimation" ~ "Environmental tolerance and preference, Development",
Trait_category == "Environmental tolerance and preference, Development, Behavior" ~ "Environmental tolerance and preference, Development",
Trait_category == "Environmental tolerance and preference, Development, Embryo physiology" ~ "Environmental tolerance and preference, Development",
Trait_category == "Environmental tolerance and preference, Development, thyroid function" ~ "Environmental tolerance and preference, Development, Other",
Trait_category == "Environmental tolerance and preference, Energetics and metabolism, Behavior" ~ "Environmental tolerance and preference, Energetics and metabolism",
Trait_category == "Environmental tolerance and preference, Energetics and metabolism, Behavior and physiology" ~ "Environmental tolerance and preference, Energetics and metabolism",
Trait_category == "Environmental tolerance and preference, Energetics and metabolism, condition factor, relative intestinal mass, and hepatosomatic index" ~ "Environmental tolerance and preference, Energetics and metabolism, Development",
Trait_category == "Environmental tolerance and preference, Energetics and metabolism, Immune function and stress physiology, Behavioral responses" ~ "Environmental tolerance and preference, Energetics and metabolism, Immune function and stress physiology",
Trait_category == "Environmental tolerance and preference, Energetics and metabolism, Immune function and stress physiology, Development, Behavior" ~ "Environmental tolerance and preference, Energetics and metabolism, Immune function and stress physiology, Development",
Trait_category == "Environmental tolerance and preference, Energetics and metabolism, Morphology and Behavior" ~ "Environmental tolerance and preference, Energetics and metabolism",
Trait_category == "Environmental tolerance and preference, Energetics and metabolism, Osmoregulation, Behavior" ~ "Environmental tolerance and preference, Energetics and metabolism, Osmoregulation",
Trait_category == "Environmental tolerance and preference, Energetics and metabolism, Performance" ~ "Environmental tolerance and preference, Energetics and metabolism",
Trait_category == "Environmental tolerance and preference, gut microbiome" ~ "Environmental tolerance and preference, Other",
Trait_category == "Environmental tolerance and preference, Immune function and stress physiology, thyroid hormones" ~ "Environmental tolerance and preference, Immune function and stress physiology, Other",
Trait_category == "Environmental tolerance and preference, Neurophysiology" ~ "Environmental tolerance and preference, Other",
Trait_category == "Environmental tolerance and preference, Performance" ~ "Environmental tolerance and preference",
Trait_category == "Environmental tolerance and preference, photochemical parameters/symbiont density" ~ "Environmental tolerance and preference, Other",
Trait_category == "Environmental tolerance and preference, Physiology and behavior" ~ "Environmental tolerance and preference",
Trait_category == "Environmental tolerance and preference, Reproduction, lifespan" ~ "Environmental tolerance and preference, Reproduction, Development",
Trait_category == "gene expression of 'energy regulation' pathways" ~ "Energetics and metabolism",
Trait_category == "Immune function and stress physiology, Development, gene expression" ~ "Immune function and stress physiology, Development",
Trait_category == "mitochondrial membrane potential; proton leak; ratio of moles of ADP consumed per mole of oxygen" ~ "Energetics and metabolism",
Trait_category == "Osmoregulation, Hydroregulation" ~ "Osmoregulation",
Trait_category == "Osmoregulation, Immune function and stress physiology, behavior" ~ "Osmoregulation, Immune function and stress physiology",
Trait_category == "Osmoregulation, Performance" ~ "Osmoregulation",
Trait_category == "Osmoregulation, Sensory physiology" ~ "Osmoregulation, Other",
Trait_category == "Resting membrane potential" ~ "Environmental tolerance and preference",
Trait_category == "Reproduction, Development, longevity" ~ "Reproduction, Development, Environmental tolerance and preference",
Trait_category == "Reproduction, Development, mortality" ~ "Reproduction, Development, Environmental tolerance and preference",
Trait_category == "Energetics and metabolism, Immune function and stress physiology, membrane potential" ~ "Energetics and metabolism, Immune function and stress physiology",
Trait_category == "Environmental tolerance and preference, membrane potential" ~ "Environmental tolerance and preference",
Trait_category == "Osmoregulation, membrane potential" ~ "Osmoregulation, Energetics and metabolism",
Trait_category == "Energetics and metabolism, membrane potential" ~ "Energetics and metabolism",
TRUE ~ Trait_category
))
# Check unique categories
data %>%
pull(Trait_category) %>%
strsplit(", ") %>%
unlist() %>%
unique() # All good
## [1] "Osmoregulation"
## [2] "Immune function and stress physiology"
## [3] "Energetics and metabolism"
## [4] "Cardiovascular physiology"
## [5] "Development"
## [6] "Environmental tolerance and preference"
## [7] "Reproduction"
## [8] "Other"
# View stressor categories
#View(data.frame(table(data$Climate_change_stressor)))
# Delete and rename some observations for environmental stressors
data <- data %>%
filter(Climate_change_stressor != "pressure exposure",
Climate_change_stressor != "Interaction with non-climatic stressor") %>%
mutate(Climate_change_stressor = case_when(
Climate_change_stressor == "Acidification" ~ "pH",
Climate_change_stressor == "altitude" ~ "Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Calcium content" ~ "pH",
Climate_change_stressor == "CO2" ~ "Oâ‚‚/COâ‚‚",
Climate_change_stressor == "diet" ~ "Other",
Climate_change_stressor == "Diet" ~ "Other",
Climate_change_stressor == "diet and water" ~ "Other, Humidity/Water availability",
Climate_change_stressor == "Humidity" ~ "Humidity/Water availability",
Climate_change_stressor == "Hypercapnia" ~ "Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Interaction with non-climatic stressor, water restriction" ~ "Interaction with non-climatic stressor, Humidity/Water availability",
Climate_change_stressor == "osmolality" ~ "Salinity",
Climate_change_stressor == "Oxygen, acidification" ~ "Oâ‚‚/COâ‚‚, pH",
Climate_change_stressor == "Oxygen, Acidification" ~ "Oâ‚‚/COâ‚‚, pH",
Climate_change_stressor == "Oxygen, altitude" ~ "Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Oxygen, carbon dioxide" ~ "Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Oxygen" ~ "Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Oxygen, CO2" ~ "Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Oxygen, Humidity" ~ "Oâ‚‚/COâ‚‚, Humidity/Water availability",
Climate_change_stressor == "Oxygen, pH, Interaction with non-climatic stressor" ~ "Oâ‚‚/COâ‚‚, Interaction with non-climatic stressor, pH",
Climate_change_stressor == "Oxygen, hypercapnia" ~ "Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Oxygen, Interaction with non-climatic stressor" ~ "Oâ‚‚/COâ‚‚, Interaction with non-climatic stressor",
Climate_change_stressor == "Oxygen, light" ~ "Oâ‚‚/COâ‚‚, Interaction with non-climatic stressor",
Climate_change_stressor == "Oxygen, pH" ~ "Oâ‚‚/COâ‚‚, pH",
Climate_change_stressor == "Oxygen, pH, acidification" ~ "Oâ‚‚/COâ‚‚, pH",
Climate_change_stressor == "Oxygen, pH, carbon dioxide" ~ "Oâ‚‚/COâ‚‚, pH",
Climate_change_stressor == "Oxygen, Salinity" ~ "Oâ‚‚/COâ‚‚, Salinity",
Climate_change_stressor == "pH, acidification" ~ "pH",
Climate_change_stressor == "pH, Acidification" ~ "pH",
Climate_change_stressor == "pH, Aluminum toxicity" ~ "pH, Interaction with non-climatic stressor",
Climate_change_stressor == "pH, Hypercapnia" ~ "Oâ‚‚/COâ‚‚, pH",
Climate_change_stressor == "pH, Salinity, CO2" ~ "Oâ‚‚/COâ‚‚, pH, Salinity",
Climate_change_stressor == "pH, salt and ammonia" ~ "pH, Salinity, Interaction with non-climatic stressor",
Climate_change_stressor == "precipitation: rainy vs dry" ~ "Humidity/Water availability",
Climate_change_stressor == "Salinity, dessication" ~ "Salinity, Humidity/Water availability",
Climate_change_stressor == "Temperature, acidification" ~ "Temperature, pH",
Climate_change_stressor == "Temperature, Acidification" ~ "Temperature, pH",
Climate_change_stressor == "Temperature, Artificial light" ~ "Temperature, Interaction with non-climatic stressor",
Climate_change_stressor == "Temperature, Carbon Dioxide" ~ "Temperature, Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Temperature, CO2" ~ "Temperature, Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Temperature, dehydration" ~ "Temperature, Humidity/Water availability",
Climate_change_stressor == "Temperature, desiccation" ~ "Temperature, Humidity/Water availability",
Climate_change_stressor == "Temperature, Diet" ~ "Temperature, Other",
Climate_change_stressor == "Temperature, food restriction" ~ "Temperature, Other",
Climate_change_stressor == "Temperature, food scarcity" ~ "Temperature, Other",
Climate_change_stressor == "Temperature, Humidity" ~ "Temperature, Humidity/Water availability",
Climate_change_stressor == "Temperature, limited food availability" ~ "Temperature, Other",
Climate_change_stressor == "Temperature, low water volume" ~ "Temperature, Humidity/Water availability",
Climate_change_stressor == "Temperature, Oxygen" ~ "Temperature, Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Temperature, Oxygen, CO2" ~ "Temperature, Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Temperature, Oxygen, Humidity" ~ "Temperature, Humidity/Water availability, Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Temperature, Oxygen, hypercapnia" ~ "Temperature, Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Temperature, Oxygen, Hypercapnia" ~ "Temperature, Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Temperature, Oxygen, Interaction with non-climatic stressor" ~ "Temperature, Oâ‚‚/COâ‚‚, Interaction with non-climatic stressor",
Climate_change_stressor == "Temperature, Oxygen, PCO2" ~ "Temperature, Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Temperature, Oxygen, pH" ~ "Temperature, pH, Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Temperature, Oxygen, Salinity" ~ "Temperature, Salinity, Oâ‚‚/COâ‚‚",
Climate_change_stressor == "Temperature, pH, acidification" ~ "Temperature, pH",
Climate_change_stressor == "Temperature, photoperiod" ~ "Temperature, Interaction with non-climatic stressor",
Climate_change_stressor == "Temperature, UV" ~ "Temperature, Other",
Climate_change_stressor == "Temperature, UV-B radiation" ~ "Temperature, Other",
Climate_change_stressor == "Temperature, UV radiation" ~ "Temperature, Other",
Climate_change_stressor == "Temperature, water restriction" ~ "Temperature, Humidity/Water availability",
Climate_change_stressor == "Temperature, wave action" ~ "Temperature, Interaction with non-climatic stressor",
Climate_change_stressor == "Ultraviolet B radiation (UV-B)" ~ "Other",
Climate_change_stressor == "UV-B" ~ "Other",
Climate_change_stressor == "UV" ~ "Other",
Climate_change_stressor == "UV-B exposure" ~ "Other",
Climate_change_stressor == "UV radiation" ~ "Other",
Climate_change_stressor == "water" ~ "Humidity/Water availability",
Climate_change_stressor == "Water availability" ~ "Humidity/Water availability",
Climate_change_stressor == "water deprivation" ~ "Humidity/Water availability",
Climate_change_stressor == "water restriction" ~ "Humidity/Water availability",
TRUE ~ Climate_change_stressor
))
# Diet and UV radiation were pooled together as "Other" because they were rare
# Check unique categories
data %>%
pull(Climate_change_stressor) %>%
strsplit(", ") %>%
unlist() %>%
unique() # All good
## [1] "Humidity/Water availability"
## [2] "Oâ‚‚/COâ‚‚"
## [3] "Other"
## [4] "Temperature"
## [5] "Salinity"
## [6] "Interaction with non-climatic stressor"
## [7] "pH"
#######################
# View life stage exposed categories
#View(data.frame(table(data$Life_stage_exposed)))
# Delete and rename some observations. Each of these were checked manually and resolved.
data <- data %>%
mutate(Life_stage_exposed = case_when(
Life_stage_exposed == "adults" ~ "Adults",
Life_stage_exposed == "Adults, Unclear" ~ "Unclear",
Life_stage_exposed == "Embryos, gametes and embryos." ~ "Embryos",
Life_stage_exposed == "Embryos, Larvae or juveniles, Adults, 7 generations exposed to 2 different temps" ~ "Mix (before and after hatching)",
Life_stage_exposed == "Embryos, Larvae or juveniles, Adults, Mix (before and after hatching)" ~ "Mix (before and after hatching)",
Life_stage_exposed == "Embryos, maybe also juveniles. It's unclear when the temperature treatment ends." ~ "Embryos, Adults",
Life_stage_exposed == "exposure was at a single time point, but performed on a mixture of juveniles and adults for the one experiment" ~ "Mix (strictly after hatching)",
Life_stage_exposed == "it is one exposure, occurring at a single time point, but some of the individuals were adult and some were juvenile." ~ "Mix (strictly after hatching)",
Life_stage_exposed == "Larvae or juveniles, adults" ~ "Larvae or juveniles, Adults",
Life_stage_exposed == "Larvae or juveniles, Age-0 (could be juveniles or adults)" ~ "Larvae or juveniles", # all species are not sexually mature at this age
Life_stage_exposed == "Larvae or juveniles, exposure was performed on larvae only but for 13 consecutive generations" ~ "Larvae or juveniles",
Life_stage_exposed == "Subadult" ~ "Larvae or juveniles", # Sub adults can be considered juveniles
Life_stage_exposed == "Unclear, 4 month old male rats" ~ "Adults", # They are sexually mature at this age
Life_stage_exposed == "Unclear, Either juveniles, adults, or a mixture of both stages. Can't easily determine it." ~ "Unclear",
Life_stage_exposed == "Unclear, I can infer its post-hatching, but cannot say with certainty whether they're juveniles or adults." ~ "Unclear",
Life_stage_exposed == "Unclear, I think it is either juvenile or adult but they don't specify" ~ "Unclear",
Life_stage_exposed == "Unclear, probably juveniles or adults" ~ "Unclear",
Life_stage_exposed == "Adults, Colonial organisms. Included gravid reproductive zooids but also incomplete zooids" ~ "Mix (strictly after hatching)",
TRUE ~ Life_stage_exposed
))
data %>%
pull(Life_stage_exposed) %>%
strsplit(", ") %>%
unlist() %>%
unique() # All good.
## [1] "Adults" "Embryos"
## [3] "Larvae or juveniles" "Mix (before and after hatching)"
## [5] "Unclear" "Mix (strictly after hatching)"
#######################
# View life stage tested categories
#View(data.frame(table(data$Life_stage_tested)))
# Delete and rename some observations for life stages
data <- data %>%
mutate(Life_stage_tested = case_when(
Life_stage_tested == "adults" ~ "Adults",
Life_stage_tested == "Adults, Colonial organisms. Included gravid reproductive zooids but also incomplete zooids" ~ "Adults, Larvae or juveniles",
Life_stage_tested == "Adults, Progeny of these adults that were exposed to diff temperature as embryos (F2)" ~ "Adults, Larvae or juveniles",
Life_stage_tested == "Adults, Unclear" ~ "Unclear",
Life_stage_tested == "Adults, unfertilized eggs" ~ "Adults",
Life_stage_tested == "analysis is on homogenates generated from multiple individuals likely spanning all life-stages." ~ "Adults, Larvae or juveniles",
Life_stage_tested == "Embryos, Larvae and juveniles" ~ "Embryos, Larvae or juveniles",
Life_stage_tested == "exposure was at a single time point, but performed on a mixture of juveniles and adults for the one experiment" ~ "Adults, Larvae or juveniles",
Life_stage_tested == "it is one experiment, occurring at a single time point, but some of the individuals were adult and some were juvenile." ~ "Adults, Larvae or juveniles",
Life_stage_tested == "Larvae or juveniles, adults" ~ "Larvae or juveniles, Adults",
Life_stage_tested == "Larvae or juveniles, Age-0 (could be juveniles or adults)" ~ "Larvae or juveniles",
Life_stage_tested == "Subadult" ~ "Larvae or juveniles",
Life_stage_tested == "Unclear, 4 months old male rats" ~ "Adults",
Life_stage_tested == "Unclear, Either juveniles, adults, or a mixture of both stages. Can't easily determine it." ~ "Unclear",
Life_stage_tested == "Unclear, I can infer its post-hatching, but cannot say with certainty whether they're juveniles or adults." ~ "Unclear",
Life_stage_tested == "Unclear, I think it is either juvenile or adult but they don't specify" ~ "Unclear",
Life_stage_tested == "Unclear, probably juvenile or adults" ~ "Unclear",
TRUE ~ Life_stage_tested
))
data %>%
pull(Life_stage_tested) %>%
strsplit(", ") %>%
unlist() %>%
unique() # All good.
## [1] "Adults" "Larvae or juveniles" "Embryos"
## [4] "Unclear"
Save processed data and citation information
# Read files with bibliographic information prior to screening
bib <- read_csv("Bibliographic_searches/all_bibliographic_records.csv")
bib <- bib %>% rename(DOI = doi)
# Left join the files to only keep the included studies
included_studies <- left_join(data, bib, by="DOI")
included_studies <- included_studies %>%
dplyr::select(title, authors, journal, DOI, abstract, year, volume, issue, pages)
# Save bibliographic file
write_csv(included_studies, file = "Bibliographic_searches/all_included_studies.csv")
# Save processed data
data <- data %>%
dplyr::select(Short_reference, Publication_year, Title, DOI, Journal, Taxonomic_group, Climate_change_stressor, Life_stage_exposed, Life_stage_tested, Trait_category, Trait_details, Additional_comments)
write_csv(data, file = "Data/cleaned_data.csv")
Overall data summary
The numbers below represent the number of studies from different journals, trait categories, climatic stressors, taxa, and life stages (exposed to the climatic stressor, or assessed for physiological traits). Note that because some studies have investigated multiple traits, stressors, taxa, and life stages, the numbers do not add to the total number of studies (n = 1245).
Journals
# Number of studies per journal
journal_summary <- data %>%
pull(Journal) %>%
table() %>%
as.data.frame() %>%
rename(`Journal` = ".", n = "Freq") %>%
mutate(percentage = (n / sum(n))*100) %>%
arrange(percentage)
flextable(journal_summary) %>%
autofit() %>%
set_caption("Journals") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all") # 181 from Cons Phys, 562 from JEB, 533 from JTB.
Journal | n | percentage |
|---|---|---|
Conservation Physiology | 181 | 14.18495 |
Journal of Thermal Biology | 533 | 41.77116 |
Journal of Experimental Biology | 562 | 44.04389 |
# Total number of studies
n_distinct(data$DOI) # 1276 studies
## [1] 1276
Trait categories
# Traits
trait_summary <- data %>%
pull(Trait_category) %>%
strsplit(", ") %>%
unlist() %>%
table() %>%
as.data.frame() %>%
rename(`Trait category` = ".", n = "Freq") %>%
mutate(percentage = (n / sum(n))*100) %>%
arrange(desc(percentage))
flextable(trait_summary) %>%
autofit() %>%
set_caption("Trait categories") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Trait category | n | percentage |
|---|---|---|
Environmental tolerance and preference | 727 | 30.7659755 |
Energetics and metabolism | 574 | 24.2911553 |
Development | 380 | 16.0812526 |
Immune function and stress physiology | 246 | 10.4104951 |
Osmoregulation | 170 | 7.1942446 |
Reproduction | 138 | 5.8400339 |
Cardiovascular physiology | 122 | 5.1629285 |
Other | 6 | 0.2539145 |
Taxonomic groups
# Taxa
taxa_summary <- data %>%
pull(Taxonomic_group) %>%
strsplit(", ") %>%
unlist() %>%
table() %>%
as.data.frame() %>%
rename(`Taxonomic group` = ".", n = "Freq") %>%
mutate(percentage = (n / sum(n))*100) %>%
arrange(desc(percentage))
flextable(taxa_summary) %>%
autofit() %>%
set_caption("Taxonomic groups") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Taxonomic group | n | percentage |
|---|---|---|
Fish | 398 | 31.069477 |
Insect | 238 | 18.579235 |
Other invertebrate | 226 | 17.642467 |
Mammal | 137 | 10.694770 |
Bird | 112 | 8.743169 |
Reptile | 100 | 7.806401 |
Amphibian | 70 | 5.464481 |
Climate change stressors
# Stressors
stressor_summary <- data %>%
pull(Climate_change_stressor) %>%
strsplit(", ") %>%
unlist() %>%
table() %>%
as.data.frame() %>%
rename(`Climatic stressor` = ".", n = "Freq") %>%
mutate(percentage = (n / sum(n))*100) %>%
arrange(desc(percentage))
flextable(stressor_summary) %>%
autofit() %>%
set_caption("Climate change stressors") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Climatic stressor | n | percentage |
|---|---|---|
Temperature | 1,041 | 65.0625 |
Oâ‚‚/COâ‚‚ | 194 | 12.1250 |
Interaction with non-climatic stressor | 138 | 8.6250 |
pH | 83 | 5.1875 |
Salinity | 68 | 4.2500 |
Humidity/Water availability | 60 | 3.7500 |
Other | 16 | 1.0000 |
# After removing studies from the Journal of Thermal Biology (which is largely focusing on temperature)
stressor_summary_jtb <- data %>%
filter(Journal != "Journal of Thermal Biology") %>%
pull(Climate_change_stressor) %>%
strsplit(", ") %>%
unlist() %>%
table() %>%
as.data.frame() %>%
rename(`Climate_stressor` = ".", n = "Freq") %>%
mutate(percentage = (n / sum(n))*100) %>%
arrange(percentage)
flextable(stressor_summary_jtb) %>%
autofit() %>%
set_caption("Climate change stressors") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Climate_stressor | n | percentage |
|---|---|---|
Other | 15 | 1.582278 |
Humidity/Water availability | 50 | 5.274262 |
Salinity | 58 | 6.118143 |
Interaction with non-climatic stressor | 59 | 6.223629 |
pH | 82 | 8.649789 |
Oâ‚‚/COâ‚‚ | 172 | 18.143460 |
Temperature | 512 | 54.008439 |
Life stage exposed to the stressor
# Life stage exposed to the climatic stressor
ls_exposed_summary <- data %>%
pull(Life_stage_exposed) %>%
strsplit(", ") %>%
unlist() %>%
table() %>%
as.data.frame() %>%
rename(`Life stage exposed` = ".", n = "Freq") %>%
mutate(percentage = (n / sum(n))*100) %>%
arrange(desc(percentage))
flextable(ls_exposed_summary) %>%
autofit() %>%
set_caption("Life stages exposed to the stressor") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Life stage exposed | n | percentage |
|---|---|---|
Adults | 690 | 49.462366 |
Larvae or juveniles | 402 | 28.817204 |
Embryos | 131 | 9.390681 |
Unclear | 82 | 5.878136 |
Mix (before and after hatching) | 59 | 4.229391 |
Mix (strictly after hatching) | 31 | 2.222222 |
Life stage assessed for physiological traits
# Life stage tested for physiological traits
ls_tested_summary <- data %>%
pull(Life_stage_tested) %>%
strsplit(", ") %>%
unlist() %>%
table() %>%
as.data.frame() %>%
rename(`Life stage tested` = ".", n = "Freq") %>%
mutate(percentage = (n / sum(n))*100) %>%
arrange(desc(percentage))
flextable(ls_tested_summary) %>%
autofit() %>%
set_caption("Life stages assessed for physiological traits") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Life stage tested | n | percentage |
|---|---|---|
Adults | 788 | 52.393617 |
Larvae or juveniles | 513 | 34.109043 |
Embryos | 120 | 7.978723 |
Unclear | 83 | 5.518617 |
Data summary by life stage (exposed to climatic stressors)
Here, data summaries are generated separately for each life stage. In this study, we differentiated the life stages exposed to climatic stressors (presented here), to those assessed for physiological stressors (presented further below), as these sometimes differ, especially in the context of longitudinal studies.
Helper function
# Helper function for splitting + unnesting life stages
split_and_summarise <- function(data, group_var) {
life_stage_order <- c("Unclear", "Mix (strictly after hatching)", "Mix (before and after hatching)", "Embryos", "Larvae or juveniles", "Adults")
data %>%
mutate(across(all_of(c("Life_stage_exposed", group_var)), ~ strsplit(as.character(.), ", "))) %>%
unnest(Life_stage_exposed) %>%
unnest(all_of(group_var)) %>%
mutate(Life_stage_exposed = factor(Life_stage_exposed, levels = life_stage_order)) %>%
count(!!sym(group_var), Life_stage_exposed, name = "n") %>%
group_by(!!sym(group_var)) %>%
mutate(proportion = n / sum(n)) %>%
ungroup() %>%
rename(`Life stage exposed` = Life_stage_exposed)
}
Journals
# Life stage exposed by Journal
life_stage_by_journal_exp <- split_and_summarise(data, "Journal")
flextable(life_stage_by_journal_exp) %>%
autofit() %>%
set_caption("Life stages exposed across journals") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Journal | Life stage exposed | n | proportion |
|---|---|---|---|
Conservation Physiology | Unclear | 20 | 0.10050251 |
Conservation Physiology | Mix (strictly after hatching) | 6 | 0.03015075 |
Conservation Physiology | Mix (before and after hatching) | 2 | 0.01005025 |
Conservation Physiology | Embryos | 24 | 0.12060302 |
Conservation Physiology | Larvae or juveniles | 82 | 0.41206030 |
Conservation Physiology | Adults | 65 | 0.32663317 |
Journal of Experimental Biology | Unclear | 26 | 0.04384486 |
Journal of Experimental Biology | Mix (strictly after hatching) | 17 | 0.02866779 |
Journal of Experimental Biology | Mix (before and after hatching) | 29 | 0.04890388 |
Journal of Experimental Biology | Embryos | 49 | 0.08263069 |
Journal of Experimental Biology | Larvae or juveniles | 115 | 0.19392917 |
Journal of Experimental Biology | Adults | 357 | 0.60202361 |
Journal of Thermal Biology | Unclear | 36 | 0.05970149 |
Journal of Thermal Biology | Mix (strictly after hatching) | 8 | 0.01326700 |
Journal of Thermal Biology | Mix (before and after hatching) | 28 | 0.04643449 |
Journal of Thermal Biology | Embryos | 58 | 0.09618574 |
Journal of Thermal Biology | Larvae or juveniles | 205 | 0.33996683 |
Journal of Thermal Biology | Adults | 268 | 0.44444444 |
Trait categories
# Life stage exposed by Trait category
life_stage_by_trait_exp <- split_and_summarise(data, "Trait_category")
flextable(life_stage_by_trait_exp) %>%
autofit() %>%
set_caption("Life stages exposed across trait categories") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Trait_category | Life stage exposed | n | proportion |
|---|---|---|---|
Cardiovascular physiology | Unclear | 11 | 0.088709677 |
Cardiovascular physiology | Mix (strictly after hatching) | 1 | 0.008064516 |
Cardiovascular physiology | Mix (before and after hatching) | 4 | 0.032258065 |
Cardiovascular physiology | Embryos | 9 | 0.072580645 |
Cardiovascular physiology | Larvae or juveniles | 22 | 0.177419355 |
Cardiovascular physiology | Adults | 77 | 0.620967742 |
Development | Unclear | 12 | 0.027906977 |
Development | Mix (strictly after hatching) | 8 | 0.018604651 |
Development | Mix (before and after hatching) | 32 | 0.074418605 |
Development | Embryos | 85 | 0.197674419 |
Development | Larvae or juveniles | 185 | 0.430232558 |
Development | Adults | 108 | 0.251162791 |
Energetics and metabolism | Unclear | 32 | 0.052892562 |
Energetics and metabolism | Mix (strictly after hatching) | 13 | 0.021487603 |
Energetics and metabolism | Mix (before and after hatching) | 12 | 0.019834711 |
Energetics and metabolism | Embryos | 41 | 0.067768595 |
Energetics and metabolism | Larvae or juveniles | 180 | 0.297520661 |
Energetics and metabolism | Adults | 327 | 0.540495868 |
Environmental tolerance and preference | Unclear | 57 | 0.071608040 |
Environmental tolerance and preference | Mix (strictly after hatching) | 18 | 0.022613065 |
Environmental tolerance and preference | Mix (before and after hatching) | 36 | 0.045226131 |
Environmental tolerance and preference | Embryos | 69 | 0.086683417 |
Environmental tolerance and preference | Larvae or juveniles | 231 | 0.290201005 |
Environmental tolerance and preference | Adults | 385 | 0.483668342 |
Immune function and stress physiology | Unclear | 16 | 0.061776062 |
Immune function and stress physiology | Mix (strictly after hatching) | 3 | 0.011583012 |
Immune function and stress physiology | Mix (before and after hatching) | 3 | 0.011583012 |
Immune function and stress physiology | Embryos | 16 | 0.061776062 |
Immune function and stress physiology | Larvae or juveniles | 85 | 0.328185328 |
Immune function and stress physiology | Adults | 136 | 0.525096525 |
Osmoregulation | Unclear | 20 | 0.114285714 |
Osmoregulation | Mix (strictly after hatching) | 9 | 0.051428571 |
Osmoregulation | Mix (before and after hatching) | 3 | 0.017142857 |
Osmoregulation | Embryos | 9 | 0.051428571 |
Osmoregulation | Larvae or juveniles | 34 | 0.194285714 |
Osmoregulation | Adults | 100 | 0.571428571 |
Other | Unclear | 1 | 0.111111111 |
Other | Embryos | 2 | 0.222222222 |
Other | Larvae or juveniles | 4 | 0.444444444 |
Other | Adults | 2 | 0.222222222 |
Reproduction | Unclear | 2 | 0.011976048 |
Reproduction | Mix (strictly after hatching) | 7 | 0.041916168 |
Reproduction | Mix (before and after hatching) | 16 | 0.095808383 |
Reproduction | Embryos | 21 | 0.125748503 |
Reproduction | Larvae or juveniles | 33 | 0.197604790 |
Reproduction | Adults | 88 | 0.526946108 |
Taxonomic groups
# Life stage exposed by Taxonomic_group
life_stage_by_taxa_exp <- split_and_summarise(data, "Taxonomic_group")
flextable(life_stage_by_taxa_exp) %>%
autofit() %>%
set_caption("Life stages exposed across taxonomic groups") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Taxonomic_group | Life stage exposed | n | proportion |
|---|---|---|---|
Amphibian | Unclear | 4 | 0.050000000 |
Amphibian | Mix (strictly after hatching) | 1 | 0.012500000 |
Amphibian | Mix (before and after hatching) | 4 | 0.050000000 |
Amphibian | Embryos | 8 | 0.100000000 |
Amphibian | Larvae or juveniles | 33 | 0.412500000 |
Amphibian | Adults | 30 | 0.375000000 |
Bird | Unclear | 7 | 0.060869565 |
Bird | Mix (strictly after hatching) | 1 | 0.008695652 |
Bird | Embryos | 21 | 0.182608696 |
Bird | Larvae or juveniles | 26 | 0.226086957 |
Bird | Adults | 60 | 0.521739130 |
Fish | Unclear | 36 | 0.085918854 |
Fish | Mix (strictly after hatching) | 9 | 0.021479714 |
Fish | Mix (before and after hatching) | 9 | 0.021479714 |
Fish | Embryos | 37 | 0.088305489 |
Fish | Larvae or juveniles | 166 | 0.396181384 |
Fish | Adults | 162 | 0.386634845 |
Insect | Unclear | 3 | 0.010238908 |
Insect | Mix (strictly after hatching) | 6 | 0.020477816 |
Insect | Mix (before and after hatching) | 26 | 0.088737201 |
Insect | Embryos | 24 | 0.081911263 |
Insect | Larvae or juveniles | 96 | 0.327645051 |
Insect | Adults | 138 | 0.470989761 |
Mammal | Unclear | 9 | 0.064285714 |
Mammal | Mix (before and after hatching) | 2 | 0.014285714 |
Mammal | Embryos | 2 | 0.014285714 |
Mammal | Larvae or juveniles | 17 | 0.121428571 |
Mammal | Adults | 110 | 0.785714286 |
Other invertebrate | Unclear | 16 | 0.064777328 |
Other invertebrate | Mix (strictly after hatching) | 12 | 0.048582996 |
Other invertebrate | Mix (before and after hatching) | 17 | 0.068825911 |
Other invertebrate | Embryos | 19 | 0.076923077 |
Other invertebrate | Larvae or juveniles | 50 | 0.202429150 |
Other invertebrate | Adults | 133 | 0.538461538 |
Reptile | Unclear | 9 | 0.084112150 |
Reptile | Mix (strictly after hatching) | 2 | 0.018691589 |
Reptile | Mix (before and after hatching) | 1 | 0.009345794 |
Reptile | Embryos | 22 | 0.205607477 |
Reptile | Larvae or juveniles | 15 | 0.140186916 |
Reptile | Adults | 58 | 0.542056075 |
Climate change stressors
# Life stage exposed by Climate_change_stressor
life_stage_by_stressor_exp <- split_and_summarise(data, "Climate_change_stressor")
flextable(life_stage_by_stressor_exp) %>%
autofit() %>%
set_caption("Life stages exposed across climate change stressors") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Climate_change_stressor | Life stage exposed | n | proportion |
|---|---|---|---|
Humidity/Water availability | Unclear | 4 | 0.064516129 |
Humidity/Water availability | Mix (strictly after hatching) | 2 | 0.032258065 |
Humidity/Water availability | Mix (before and after hatching) | 1 | 0.016129032 |
Humidity/Water availability | Embryos | 2 | 0.032258065 |
Humidity/Water availability | Larvae or juveniles | 6 | 0.096774194 |
Humidity/Water availability | Adults | 47 | 0.758064516 |
Interaction with non-climatic stressor | Unclear | 7 | 0.048611111 |
Interaction with non-climatic stressor | Mix (strictly after hatching) | 2 | 0.013888889 |
Interaction with non-climatic stressor | Mix (before and after hatching) | 4 | 0.027777778 |
Interaction with non-climatic stressor | Embryos | 7 | 0.048611111 |
Interaction with non-climatic stressor | Larvae or juveniles | 58 | 0.402777778 |
Interaction with non-climatic stressor | Adults | 66 | 0.458333333 |
Other | Embryos | 1 | 0.058823529 |
Other | Larvae or juveniles | 8 | 0.470588235 |
Other | Adults | 8 | 0.470588235 |
Oâ‚‚/COâ‚‚ | Unclear | 11 | 0.053921569 |
Oâ‚‚/COâ‚‚ | Mix (strictly after hatching) | 4 | 0.019607843 |
Oâ‚‚/COâ‚‚ | Mix (before and after hatching) | 2 | 0.009803922 |
Oâ‚‚/COâ‚‚ | Embryos | 24 | 0.117647059 |
Oâ‚‚/COâ‚‚ | Larvae or juveniles | 54 | 0.264705882 |
Oâ‚‚/COâ‚‚ | Adults | 109 | 0.534313725 |
Salinity | Unclear | 11 | 0.150684932 |
Salinity | Mix (strictly after hatching) | 5 | 0.068493151 |
Salinity | Mix (before and after hatching) | 2 | 0.027397260 |
Salinity | Embryos | 5 | 0.068493151 |
Salinity | Larvae or juveniles | 23 | 0.315068493 |
Salinity | Adults | 27 | 0.369863014 |
Temperature | Unclear | 62 | 0.054243220 |
Temperature | Mix (strictly after hatching) | 24 | 0.020997375 |
Temperature | Mix (before and after hatching) | 51 | 0.044619423 |
Temperature | Embryos | 107 | 0.093613298 |
Temperature | Larvae or juveniles | 340 | 0.297462817 |
Temperature | Adults | 559 | 0.489063867 |
pH | Unclear | 8 | 0.086021505 |
pH | Mix (strictly after hatching) | 3 | 0.032258065 |
pH | Mix (before and after hatching) | 7 | 0.075268817 |
pH | Embryos | 7 | 0.075268817 |
pH | Larvae or juveniles | 31 | 0.333333333 |
pH | Adults | 37 | 0.397849462 |
Data summary by life stage (assessed for physiological traits)
Here, data summaries are generated separately for each life stage. In this study, we differentiated the life stages exposed to climatic stressors (presented above), to those assessed for physiological stressors (presented here), as these sometimes differ, especially in the context of longitudinal studies.
Helper function
# Helper function for splitting + unnesting the different life stages
split_and_summarise2 <- function(data, group_var) {
life_stage_order <- c("Unclear", "Embryos", "Larvae or juveniles", "Adults")
data %>%
mutate(across(all_of(c("Life_stage_tested", group_var)), ~ strsplit(as.character(.), ", "))) %>%
unnest(Life_stage_tested) %>%
unnest(all_of(group_var)) %>%
mutate(Life_stage_tested = factor(Life_stage_tested, levels = life_stage_order)) %>%
count(!!sym(group_var), Life_stage_tested, name = "n") %>%
group_by(!!sym(group_var)) %>%
mutate(proportion = n / sum(n)) %>%
ungroup() %>%
rename(`Life stage tested` = Life_stage_tested)
}
Journals
# Life_stage_tested by Journal
life_stage_by_journal <- split_and_summarise2(data, "Journal")
flextable(life_stage_by_journal) %>%
autofit() %>%
set_caption("Life stages tested across journals") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Journal | Life stage tested | n | proportion |
|---|---|---|---|
Conservation Physiology | Unclear | 20 | 0.09433962 |
Conservation Physiology | Embryos | 19 | 0.08962264 |
Conservation Physiology | Larvae or juveniles | 98 | 0.46226415 |
Conservation Physiology | Adults | 75 | 0.35377358 |
Journal of Experimental Biology | Unclear | 28 | 0.04341085 |
Journal of Experimental Biology | Embryos | 45 | 0.06976744 |
Journal of Experimental Biology | Larvae or juveniles | 172 | 0.26666667 |
Journal of Experimental Biology | Adults | 400 | 0.62015504 |
Journal of Thermal Biology | Unclear | 35 | 0.05409583 |
Journal of Thermal Biology | Embryos | 56 | 0.08655332 |
Journal of Thermal Biology | Larvae or juveniles | 243 | 0.37557960 |
Journal of Thermal Biology | Adults | 313 | 0.48377125 |
Trait categories
# Life_stage_tested by Trait category
life_stage_by_trait <- split_and_summarise2(data, "Trait_category")
flextable(life_stage_by_trait) %>%
autofit() %>%
set_caption("Life stages tested across trait categories") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Trait_category | Life stage tested | n | proportion |
|---|---|---|---|
Cardiovascular physiology | Unclear | 11 | 0.08333333 |
Cardiovascular physiology | Embryos | 8 | 0.06060606 |
Cardiovascular physiology | Larvae or juveniles | 32 | 0.24242424 |
Cardiovascular physiology | Adults | 81 | 0.61363636 |
Development | Unclear | 10 | 0.01984127 |
Development | Embryos | 77 | 0.15277778 |
Development | Larvae or juveniles | 255 | 0.50595238 |
Development | Adults | 162 | 0.32142857 |
Energetics and metabolism | Unclear | 33 | 0.05238095 |
Energetics and metabolism | Embryos | 32 | 0.05079365 |
Energetics and metabolism | Larvae or juveniles | 212 | 0.33650794 |
Energetics and metabolism | Adults | 353 | 0.56031746 |
Environmental tolerance and preference | Unclear | 59 | 0.06876457 |
Environmental tolerance and preference | Embryos | 70 | 0.08158508 |
Environmental tolerance and preference | Larvae or juveniles | 294 | 0.34265734 |
Environmental tolerance and preference | Adults | 435 | 0.50699301 |
Immune function and stress physiology | Unclear | 16 | 0.05904059 |
Immune function and stress physiology | Embryos | 12 | 0.04428044 |
Immune function and stress physiology | Larvae or juveniles | 98 | 0.36162362 |
Immune function and stress physiology | Adults | 145 | 0.53505535 |
Osmoregulation | Unclear | 21 | 0.10937500 |
Osmoregulation | Embryos | 9 | 0.04687500 |
Osmoregulation | Larvae or juveniles | 51 | 0.26562500 |
Osmoregulation | Adults | 111 | 0.57812500 |
Other | Unclear | 1 | 0.12500000 |
Other | Larvae or juveniles | 5 | 0.62500000 |
Other | Adults | 2 | 0.25000000 |
Reproduction | Unclear | 3 | 0.01442308 |
Reproduction | Embryos | 29 | 0.13942308 |
Reproduction | Larvae or juveniles | 57 | 0.27403846 |
Reproduction | Adults | 119 | 0.57211538 |
Taxonomic groups
# Life_stage_tested by Taxonomic_group
life_stage_by_taxa <- split_and_summarise2(data, "Taxonomic_group")
flextable(life_stage_by_taxa) %>%
autofit() %>%
set_caption("Life stages tested across taxonomic groups") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Taxonomic_group | Life stage tested | n | proportion |
|---|---|---|---|
Amphibian | Unclear | 4 | 0.048780488 |
Amphibian | Embryos | 5 | 0.060975610 |
Amphibian | Larvae or juveniles | 39 | 0.475609756 |
Amphibian | Adults | 34 | 0.414634146 |
Bird | Unclear | 7 | 0.055118110 |
Bird | Embryos | 15 | 0.118110236 |
Bird | Larvae or juveniles | 43 | 0.338582677 |
Bird | Adults | 62 | 0.488188976 |
Fish | Unclear | 37 | 0.084090909 |
Fish | Embryos | 33 | 0.075000000 |
Fish | Larvae or juveniles | 192 | 0.436363636 |
Fish | Adults | 178 | 0.404545455 |
Insect | Unclear | 3 | 0.009345794 |
Insect | Embryos | 25 | 0.077881620 |
Insect | Larvae or juveniles | 101 | 0.314641745 |
Insect | Adults | 192 | 0.598130841 |
Mammal | Unclear | 8 | 0.054794521 |
Mammal | Embryos | 1 | 0.006849315 |
Mammal | Larvae or juveniles | 22 | 0.150684932 |
Mammal | Adults | 115 | 0.787671233 |
Other invertebrate | Unclear | 18 | 0.064981949 |
Other invertebrate | Embryos | 25 | 0.090252708 |
Other invertebrate | Larvae or juveniles | 83 | 0.299638989 |
Other invertebrate | Adults | 151 | 0.545126354 |
Reptile | Unclear | 8 | 0.068376068 |
Reptile | Embryos | 16 | 0.136752137 |
Reptile | Larvae or juveniles | 34 | 0.290598291 |
Reptile | Adults | 59 | 0.504273504 |
Climate change stressors
# Life_stage_tested by Climate_change_stressor
life_stage_by_stressor <- split_and_summarise2(data, "Climate_change_stressor")
flextable(life_stage_by_stressor) %>%
autofit() %>%
set_caption("Life stages tested across climate change stressors") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Climate_change_stressor | Life stage tested | n | proportion |
|---|---|---|---|
Humidity/Water availability | Unclear | 4 | 0.06250000 |
Humidity/Water availability | Embryos | 2 | 0.03125000 |
Humidity/Water availability | Larvae or juveniles | 8 | 0.12500000 |
Humidity/Water availability | Adults | 50 | 0.78125000 |
Interaction with non-climatic stressor | Unclear | 7 | 0.04545455 |
Interaction with non-climatic stressor | Embryos | 7 | 0.04545455 |
Interaction with non-climatic stressor | Larvae or juveniles | 64 | 0.41558442 |
Interaction with non-climatic stressor | Adults | 76 | 0.49350649 |
Other | Embryos | 1 | 0.05555556 |
Other | Larvae or juveniles | 8 | 0.44444444 |
Other | Adults | 9 | 0.50000000 |
Oâ‚‚/COâ‚‚ | Unclear | 12 | 0.05529954 |
Oâ‚‚/COâ‚‚ | Embryos | 18 | 0.08294931 |
Oâ‚‚/COâ‚‚ | Larvae or juveniles | 67 | 0.30875576 |
Oâ‚‚/COâ‚‚ | Adults | 120 | 0.55299539 |
Salinity | Unclear | 12 | 0.15000000 |
Salinity | Embryos | 5 | 0.06250000 |
Salinity | Larvae or juveniles | 31 | 0.38750000 |
Salinity | Adults | 32 | 0.40000000 |
Temperature | Unclear | 62 | 0.05040650 |
Temperature | Embryos | 97 | 0.07886179 |
Temperature | Larvae or juveniles | 429 | 0.34878049 |
Temperature | Adults | 642 | 0.52195122 |
pH | Unclear | 8 | 0.07766990 |
pH | Embryos | 11 | 0.10679612 |
pH | Larvae or juveniles | 44 | 0.42718447 |
pH | Adults | 40 | 0.38834951 |
Figures
Note that all figures were customised in Illustrator for cosmetic purposes.
Figure 1
Colour palettes and themes
# Creata colour palette
palette <- c(
"Unclear" = "gray70",
"Embryos" = "#E6AB02",
"Larvae or juveniles" = "#7570B3",
"Adults" = "#1B9E77",
"Mix (before and after hatching)" = "#7D9364",
"Mix (strictly after hatching)" = "#AE8E5B")
# Create custom theme
custom_theme <- theme_minimal(base_size = 14) +
theme(
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
axis.line = element_line(color = "black", linewidth = 0.4),
axis.ticks = element_line(color = "black"),
axis.text.y = element_text(size = 16, hjust = 1, color = "black"),
axis.text.x = element_text(size = 15),
axis.title.x = element_text(size = 24),
axis.title.y = element_blank(),
legend.title = element_text(size = 16),
legend.text = element_text(size = 14),
legend.position = c(0.95, 0.05),
legend.justification = c("right", "bottom"),
legend.background = element_blank(),
panel.border = element_rect(color = "black", fill = NA, size = 1.25))
Temporal trends
Life stage exposed to the stressor
# Prepare data for stream plot (proportions by year and life stage)
ls_exposed_stream <- data %>%
select(Publication_year, Life_stage_exposed) %>%
mutate(Life_stage_exposed = strsplit(Life_stage_exposed, ", ")) %>%
unnest(Life_stage_exposed) %>%
group_by(Publication_year, Life_stage_exposed) %>%
summarise(n = n(), .groups = "drop") %>%
group_by(Publication_year) %>%
mutate(proportion = n / sum(n)) %>%
ungroup() %>%
mutate(Life_stage_exposed = factor(
Life_stage_exposed,
levels = c(
"Adults",
"Larvae or juveniles",
"Embryos",
"Mix (before and after hatching)",
"Mix (strictly after hatching)",
"Unclear"
)
))
# Create plot
stream_ls_exposed <- ggplot(data = ls_exposed_stream,
aes(x = Publication_year,
y = proportion,
fill = Life_stage_exposed)) +
geom_stream(type = "proportion", alpha = 0.6) +
geom_stream_label(type = "ridge", aes(label = Life_stage_exposed), size = 7) +
scale_fill_manual(values = palette)+
scale_y_continuous(breaks = seq(0, 1, 0.25),
expand = c(0, 0)) +
scale_x_continuous(
breaks = seq(min(ls_exposed_stream$Publication_year, na.rm = TRUE),
max(ls_exposed_stream$Publication_year, na.rm = TRUE),
by = 2),
expand = c(0, 0)) +
labs(
x = "Publication year",
y = "Proportion of studies",
title = "Life stage exposed") +
custom_theme +
theme(legend.position = "none")
Life stage tested for physiological traits
# Prepare data for stream plot (proportions by year and life stage)
ls_tested_stream <- data %>%
select(Publication_year, Life_stage_tested) %>%
mutate(Life_stage_tested= strsplit(Life_stage_tested, ", ")) %>%
unnest(Life_stage_tested) %>%
group_by(Publication_year, Life_stage_tested) %>%
summarise(n = n(), .groups = "drop") %>%
group_by(Publication_year) %>%
mutate(proportion = n / sum(n)) %>%
ungroup() %>%
mutate(Life_stage_tested = factor(
Life_stage_tested,
levels = c(
"Adults",
"Larvae or juveniles",
"Embryos",
"Unclear"
)
))
# Create plot
stream_ls_tested <- ggplot(data = ls_tested_stream,
aes(x = Publication_year,
y = proportion,
fill = Life_stage_tested)) +
geom_stream(type = "proportion", alpha = 0.6) +
geom_stream_label(type = "ridge", aes(label = Life_stage_tested), size = 7) +
scale_fill_manual(values = palette)+
scale_y_continuous(expand = c(0, 0)) +
scale_x_continuous(
breaks = seq(min(ls_tested_stream$Publication_year, na.rm = TRUE),
max(ls_tested_stream$Publication_year, na.rm = TRUE),
by = 2),
expand = c(0, 0)
) +
labs(
x = "Publication year",
y = "Proportion of studies",
fill = "Life stage tested",
title = "Life stage tested") +
custom_theme +
theme(legend.position = "none")
Combine plots
# Combine plots
stream_plot <- (stream_ls_exposed | stream_ls_tested) +
plot_annotation(tag_levels = "a", tag_suffix = ".") & theme(plot.tag = element_text(size = 35))
stream_plot
Trends across journals
Life stage exposed to the stressor
# Overall sample size
overall_journal_exp <- sum(life_stage_by_journal_exp$n)
# Data summary for the plot
plot_journal_exp <- life_stage_by_journal_exp %>%
group_by(Journal) %>%
mutate(n_total = sum(n)) %>%
ungroup() %>%
mutate(
Journal_label = reorder(Journal, n_total),
percentage = n / overall_journal_exp * 100 # each row’s percentage of overall studies
)
# Prepare a summary for the total counts per journal
label_data_exp <- plot_journal_exp %>%
group_by(Journal_label) %>%
summarise(
total_percentage = sum(percentage),
total_count = first(n_total)
) %>%
ungroup() %>%
mutate(
# Only display counts if 15 or greater
label = ifelse(total_count >= 15, paste0("n=", total_count), NA)
)
# Create the plot
journal_plot_exposed <- ggplot(plot_journal_exp, aes(x = Journal_label, y = percentage, fill = `Life stage exposed`)) +
geom_col(alpha = 0.6, width = 0.8, size = 0.2, color = "black") +
# Labels for individual segments (inside the bars), only display if n > 15
geom_text(aes(label = ifelse(n >= 15, n, "")),
position = position_stack(vjust = 0.5),
size = 5,
color = "black") +
scale_fill_manual(values =palette, name = "Life stage exposed") +
scale_x_discrete(name = "Journal") +
scale_y_continuous(
name = "Percentage of studies (%)",
breaks = seq(0, 100, by = 10),
expand = c(0, 1)) +
coord_flip() +
custom_theme
Life stage tested for physiological traits
# Overall sample size
overall_journal <- sum(life_stage_by_journal$n)
# Data summary for the plot
plot_journal <- life_stage_by_journal %>%
group_by(Journal) %>%
mutate(n_total = sum(n)) %>%
ungroup() %>%
mutate(
Journal_label = reorder(Journal, n_total),
percentage = n / overall_journal * 100
)
# Prepare a summary for the total counts per journal
label_data <- plot_journal %>%
group_by(Journal_label) %>%
summarise(
total_percentage = sum(percentage),
total_count = first(n_total)
) %>%
ungroup() %>%
mutate(
# Only display counts if 15 or greater
label = ifelse(total_count >= 15, paste0("n=", total_count), NA)
)
# Create the plot
journal_plot_tested <- ggplot(plot_journal, aes(x = Journal_label, y = percentage, fill = `Life stage tested`)) +
geom_col(alpha = 0.6, width = 0.8, size = 0.2, color = "black") +
# Labels for individual segments (inside the bars), only display if n > 15
geom_text(aes(label = ifelse(n >= 15, n, "")),
position = position_stack(vjust = 0.5),
size = 5,
color = "black") +
scale_fill_manual(values = palette, name = "Life stage assessed") +
scale_x_discrete(name = "Journal") +
scale_y_continuous(
name = "Percentage of studies (%)",
breaks = seq(0, 100, by = 10),
expand = c(0, 1)) +
coord_flip() +
custom_theme
Combine plots
# Combine plots
journal_plot <- (journal_plot_exposed | journal_plot_tested) +
plot_annotation(tag_levels = "a", tag_suffix = ".") & theme(plot.tag = element_text(size = 35))
journal_plot
Combine plots
figure_1 <- (stream_plot / journal_plot) +
plot_annotation(tag_levels = "a", tag_suffix = ".") & theme(plot.tag = element_text(size = 35))
figure_1
ggsave(figure_1, file = "Fig/figure_1.svg", width=30, height = 20, dpi = 1200)
Figure 2
Trends across trait categories
Life stage exposed to the stressor
# Overall sample size
overall_trait_exp <- sum(life_stage_by_trait_exp$n)
# Data summary for the plot
plot_trait_exp <- life_stage_by_trait_exp %>%
filter(Trait_category != "Other") %>% # Remove "Other" category for clarity
# Rename the trait categories
mutate(Trait_category = recode(Trait_category,
"Environmental tolerance and preference" = "Environmental tolerance/preference",
"Immune function and stress physiology" = "Immune function/stress physiology",
"Energetics and metabolism" = "Energetics/metabolism"
)) %>%
group_by(Trait_category) %>%
mutate(
n_total = sum(n)
) %>%
ungroup() %>%
mutate(
trait_label = reorder(Trait_category, n_total),
percentage = n / overall_trait_exp * 100
)
# Prepare a summary for the total counts per trait
label_data_exp <- plot_trait_exp %>%
group_by(trait_label) %>%
summarise(
total_percentage = sum(percentage),
total_count = first(n_total)
) %>%
ungroup() %>%
mutate(
# Only display counts if 15 or greate
label = ifelse(total_count >= 15, paste0("n=", total_count), NA)
)
# Create the plot
trait_plot_exposed <- ggplot(plot_trait_exp, aes(x = trait_label, y = percentage, fill = `Life stage exposed`)) +
geom_col(alpha = 0.6, width = 0.8, size = 0.2, color = "black") +
# Labels for individual segments (inside the bars); only display if n > 15
geom_text(aes(label = ifelse(n >= 15, n, "")),
position = position_stack(vjust = 0.5),
size = 5,
color = "black") +
scale_fill_manual(values = palette, name = "Life stage exposed") +
scale_x_discrete(name = "Trait category") +
scale_y_continuous(
name = "Percentage of studies (%)",
breaks = seq(0, 100, by = 10),
expand = c(0, 1)) +
coord_flip() +
custom_theme
Life stage tested for physiological traits
# Overall sample size
overall_trait <- sum(life_stage_by_trait$n)
# Data summary for the plot
plot_trait <- life_stage_by_trait %>%
filter(Trait_category != "Other") %>% # Remove "Other" category for clarity
mutate(Trait_category = recode(Trait_category,
"Environmental tolerance and preference" = "Environmental tolerance/preference",
"Immune function and stress physiology" = "Immune function/stress physiology",
"Energetics and metabolism" = "Energetics/metabolism"
)) %>%
mutate(
`Life stage tested` = factor(
`Life stage tested`,
levels = c("Unclear", "Embryos", "Larvae or juveniles", "Adults")
)
) %>%
group_by(Trait_category) %>%
mutate(
n_total = sum(n)
) %>%
ungroup() %>%
mutate(
trait_label = reorder(Trait_category, n_total),
percentage = n / overall_trait * 100
)
# Prepare a summary for the total counts per trait
label_data <- plot_trait %>%
group_by(trait_label) %>%
summarise(
total_percentage = sum(percentage),
total_count = first(n_total)
) %>%
ungroup() %>%
mutate(
# Only display counts if 15 or greater
label = ifelse(total_count >= 15, paste0("n=", total_count), NA)
)
# Create the plot
trait_plot_tested <- ggplot(plot_trait, aes(x = trait_label, y = percentage, fill = `Life stage tested`)) +
geom_col(alpha = 0.6, width = 0.8, size = 0.2, color = "black") +
# Labels for individual segments (inside the bars); only display if n > 15
geom_text(aes(label = ifelse(n >= 15, n, "")),
position = position_stack(vjust = 0.5),
size = 5,
color = "black") +
scale_fill_manual(values = palette, name = "Life stage assessed") +
scale_x_discrete(name = "Trait category") +
scale_y_continuous(
name = "Percentage of studies (%)",
breaks = seq(0, 100, by = 10),
expand = c(0, 1)) +
coord_flip() +
custom_theme
Combine plots
# Combine plots
trait_plot <- (trait_plot_exposed | trait_plot_tested) +
plot_annotation(tag_levels = "a", tag_suffix = ".") & theme(plot.tag = element_text(size = 35))
trait_plot
Trends across taxonomic groups
Life stage exposed to the stressor
# Overall sample size
overall_taxa_exp <- sum(life_stage_by_taxa_exp$n)
# Data summary for the plot
plot_taxa_exp <- life_stage_by_taxa_exp %>%
group_by(Taxonomic_group) %>%
mutate(
n_total = sum(n)
) %>%
ungroup() %>%
mutate(
Taxa_label = reorder(Taxonomic_group, n_total),
percentage = n / overall_taxa_exp * 100
)
# Prepare a summary for the total counts per taxonomic group
label_data_exp <- plot_taxa_exp %>%
group_by(Taxa_label) %>%
summarise(
total_percentage = sum(percentage),
total_count = first(n_total)
) %>%
ungroup() %>%
mutate(
# Only display counts if 15 or greater
label = ifelse(total_count >= 15, paste0("n=", total_count), NA)
)
# Create the plot
taxa_plot_exposed <- ggplot(plot_taxa_exp, aes(x = Taxa_label, y = percentage, fill = `Life stage exposed`)) +
geom_col(alpha = 0.6, width = 0.8, size = 0.2, color = "black") +
# Labels for individual segments (inside the bars), only display if n > 15
geom_text(aes(label = ifelse(n >= 15, n, "")),
position = position_stack(vjust = 0.5),
size = 5,
color = "black") +
scale_fill_manual(values = palette, name = "Life stage exposed") +
scale_x_discrete(name = "Taxonomic group") +
scale_y_continuous(
name = "Percentage of studies (%)",
breaks = seq(0, 100, by = 10),
expand = c(0, 1)) +
coord_flip() +
custom_theme
Life stage tested for physiological traits
# Overall sample size
overall_taxa <- sum(life_stage_by_taxa$n)
# Data summary for the plot
plot_taxa <- life_stage_by_taxa %>%
group_by(Taxonomic_group) %>%
mutate(
n_total = sum(n)
) %>%
ungroup() %>%
mutate(
Taxa_label = reorder(Taxonomic_group, n_total),
percentage = n / overall_taxa * 100
)
# Prepare a summary for the total counts per taxonomic group
label_data <- plot_taxa %>%
group_by(Taxa_label) %>%
summarise(
total_percentage = sum(percentage),
total_count = first(n_total)
) %>%
ungroup() %>%
mutate(
# Only display counts if 15 or greater
label = ifelse(total_count >= 15, paste0("n=", total_count), NA)
)
# Create the plot
taxa_plot_tested <- ggplot(plot_taxa, aes(x = Taxa_label, y = percentage, fill = `Life stage tested`)) +
geom_col(alpha = 0.6, width = 0.8, size = 0.2, color = "black") +
# Labels for individual segments (inside the bars), only display if n > 15
geom_text(aes(label = ifelse(n >= 15, n, "")),
position = position_stack(vjust = 0.5),
size = 5,
color = "black") +
scale_fill_manual(values = palette, name = "Life stage assessed") +
scale_x_discrete(name = "Taxonomic group") +
scale_y_continuous(
name = "Percentage of studies (%)",
breaks = seq(0, 100, by = 10),
expand = c(0, 1)) +
coord_flip() +
custom_theme
Combine plots
# Combine plots
taxa_plot <- (taxa_plot_exposed | taxa_plot_tested) +
plot_annotation(tag_levels = "a", tag_suffix = ".") & theme(plot.tag = element_text(size = 35))
taxa_plot
Trends across climatic stressors
Life stage exposed to the stressor
stressor_label_exprs <- c(
"Other" = expression("Other"),
"Non-climatic stressor" = expression("Non"~"climatic"~"stressor"),
"Humidity/Water availability" = expression("Water"~"availability"),
"Salinity" = expression("Salinity"),
"pH" = expression("pH"),
"Oâ‚‚/COâ‚‚" = expression(O[2]*"/"*CO[2]),
"Temperature" = expression("Temperature")
)
# Overall sample size
overall_stressor_exp <- sum(life_stage_by_stressor_exp$n)
# Data summary for the plot
plot_stressor_exp <- life_stage_by_stressor_exp %>%
filter(Climate_change_stressor != "Other" &
Climate_change_stressor != "Interaction with non-climatic stressor") %>% # Take out some categories for clarity
group_by(Climate_change_stressor) %>%
mutate(
n_total = sum(n)
) %>%
ungroup() %>%
mutate(
stressor_label = reorder(Climate_change_stressor, n_total),
percentage = n / overall_stressor_exp * 100
)
# Prepare a summary for the total counts per stressor
label_data_exp <- plot_stressor_exp %>%
group_by(stressor_label) %>%
summarise(
total_percentage = sum(percentage),
total_count = first(n_total)
) %>%
ungroup() %>%
mutate(
# Only display counts if 15 or greater
label = ifelse(total_count >= 15, paste0("n=", total_count), NA)
)
# Create the plot
stressor_plot_exposed <- ggplot(plot_stressor_exp, aes(x = stressor_label, y = percentage, fill = `Life stage exposed`)) +
geom_col(alpha = 0.6, width = 0.8, size = 0.2, color = "black") +
# Labels for individual segments (inside the bars); only display if n > 15
geom_text(aes(label = ifelse(n >= 15, n, "")),
position = position_stack(vjust = 0.5),
size = 5,
color = "black") +
scale_fill_manual(values = palette, name = "Life stage exposed") +
scale_x_discrete(name = "Stressor category", labels = stressor_label_exprs) +
scale_y_continuous(
name = "Percentage of studies (%)",
breaks = seq(0, 100, by = 10),
expand = c(0, 1)) +
coord_flip() +
custom_theme
Life stage tested for physiological traits
stressor_label_exprs <- c(
"Other" = expression("Other"),
"Non-climatic stressor" = expression("Non"~"climatic"~"stressor"),
"Humidity/Water availability" = expression("Water"~"availability"),
"Salinity" = expression("Salinity"),
"pH" = expression("pH"),
"Oâ‚‚/COâ‚‚" = expression(O[2]*"/"*CO[2]),
"Temperature" = expression("Temperature")
)
# Overall sample size
overall_stressor <- sum(life_stage_by_stressor$n)
# Data summary for the plot
plot_stressor <- life_stage_by_stressor %>%
filter(Climate_change_stressor != "Other" &
Climate_change_stressor != "Interaction with non-climatic stressor") %>% # Take out some categories for clarity
group_by(Climate_change_stressor) %>%
mutate(
n_total = sum(n)
) %>%
ungroup() %>%
mutate(
stressor_label = reorder(Climate_change_stressor, n_total),
percentage = n / overall_stressor * 100
)
# Prepare a summary for the total counts per stressor
label_data <- plot_stressor %>%
group_by(stressor_label) %>%
summarise(
total_percentage = sum(percentage),
total_count = first(n_total)
) %>%
ungroup() %>%
mutate(
# Only display counts if 15 or greater
label = ifelse(total_count >= 15, paste0("n=", total_count), NA)
)
# Create the plot
stressor_plot_tested <- ggplot(plot_stressor, aes(x = stressor_label, y = percentage, fill = `Life stage tested`)) +
geom_col(alpha = 0.6, width = 0.8, size = 0.2, color = "black") +
# Labels for individual segments (inside the bars); only display if n > 15
geom_text(aes(label = ifelse(n >= 15, n, "")),
position = position_stack(vjust = 0.5),
size = 5,
color = "black") +
scale_fill_manual(values = palette, name = "Life stage assessed") +
scale_x_discrete(name = "Stressor category", labels = stressor_label_exprs) +
scale_y_continuous(
name = "Percentage of studies (%)",
breaks = seq(0, 100, by = 10),
expand = c(0, 1)) +
coord_flip() +
custom_theme
Combine plots
# Combine plots
stressor_plot <- (stressor_plot_exposed | stressor_plot_tested) +
plot_annotation(tag_levels = "a", tag_suffix = ".") & theme(plot.tag = element_text(size = 35))
stressor_plot
Combine plots
figure_2 <- (trait_plot / taxa_plot / stressor_plot) +
plot_annotation(tag_levels = "a", tag_suffix = ".") & theme(plot.tag = element_text(size = 35))
figure_2
ggsave(figure_2, file = "Fig/figure_2.svg", width=40, height = 30, dpi = 1200, limitsize = FALSE)
Figure 3
Cord diagram to visualise studies with single vs multiple life stages
categories <- c("Adults", "Larvae or juveniles", "Embryos")
# Parse life stages
data <- data %>%
mutate(lifestages = strsplit(Life_stage_tested, ",\\s*") %>% map(trimws))
# Dummy list to store matrix
dummy_list <- data %>%
mutate(dummy = map(lifestages, ~ as.integer(categories %in% .x))) %>%
pull(dummy) %>%
map(~ setNames(.x, categories))
# Add names to each dummy vector
dummy_list <- map(dummy_list, ~ setNames(.x, categories))
# Sum the outer products of the dummy vectors to form a co-occurrence matrix.
# Each record contributes an outer product: if a record has both "Adults" and "Embryos",
# then outer(vec, vec) returns a matrix with a 1 in that cell.
NetMatrix_lifestage <- Reduce("+", lapply(dummy_list, function(vec) outer(vec, vec)))
# Separate cases where there is a single vs. multiple life stages
exclusive_counts <- sapply(categories, function(cat) {
sum(lengths(data$lifestages) == 1 & vapply(data$lifestages, function(x) x[1] == cat, logical(1)))
})
diag(NetMatrix_lifestage) <- exclusive_counts # replace diagonal
NetMatrix_lifestage[lower.tri(NetMatrix_lifestage)] <- 0 # Remove duplicated information
# Check the matrix
print(NetMatrix_lifestage)
## Adults Larvae or juveniles Embryos
## Adults 635 142 36
## Larvae or juveniles 0 321 75
## Embryos 0 0 34
# Create the chord diagram
#pdf(file ="Fig/figure_3.pdf", width = 8, height = 8, pointsize = 10)
png(file ="Fig/figure_3.png", pointsize = 4.5, res = 1000, width = 10, height = 10, unit = "cm",)
circos.par(gap.after = c(2,2,2)) # Adjust space between categories
figure_3 <- chordDiagram(NetMatrix_lifestage,
annotationTrack = "grid",
preAllocateTracks = 1,
grid.col = palette,
self.link = 1) # Don't duplicate data
# Remove the sector names (labels) and just display the axis (numbers/ticks)
circos.trackPlotRegion(track.index = 1, panel.fun = function(x, y) {
xlim <- get.cell.meta.data("xlim")
ylim <- get.cell.meta.data("ylim")
sector.name <- get.cell.meta.data("sector.index")
circos.axis(h = "top", labels.cex = 0.75, major.tick.length = 0.2,
sector.index = sector.name, track.index = 2)
}, bg.border = NA)
figure_3
## rn cn value1 value2 o1 o2 x1 x2 col
## 1 Adults Adults 635 635 3 0 813 813 #1B9E777F
## 2 Larvae or juveniles Adults 0 0 1 5 0 813 #7570B37F
## 3 Embryos Adults 0 0 2 4 0 813 #E6AB027F
## 4 Adults Larvae or juveniles 142 142 2 4 178 538 #1B9E777F
## 5 Larvae or juveniles Larvae or juveniles 321 321 3 0 396 396 #7570B37F
## 6 Embryos Larvae or juveniles 0 0 1 5 0 538 #E6AB027F
## 7 Adults Embryos 36 36 1 5 36 145 #1B9E777F
## 8 Larvae or juveniles Embryos 75 75 2 4 75 109 #7570B37F
## 9 Embryos Embryos 34 34 3 0 34 34 #E6AB027F
dev.off()
## png
## 2
Supplementary figures
Figure S1
This figure was generated in powerpoint.
Figure S2
This figure reproduces the patterns in figure 1, but only keeping studies measuring responses to temperature (i.e., the most common climatic stressor)
Temporal trends
Life stage exposed to the stressor
# Filter to studies on temperature only
data_temp <- filter(data, Climate_change_stressor == "Temperature") # 765 studies
# Prepare data for stream plot (proportions by year and life stage)
ls_exposed_stream_temp <- data_temp %>%
select(Publication_year, Life_stage_exposed) %>%
mutate(Life_stage_exposed = strsplit(Life_stage_exposed, ", ")) %>%
unnest(Life_stage_exposed) %>%
group_by(Publication_year, Life_stage_exposed) %>%
summarise(n = n(), .groups = "drop") %>%
group_by(Publication_year) %>%
mutate(proportion = n / sum(n)) %>%
ungroup() %>%
mutate(Life_stage_exposed = factor(
Life_stage_exposed,
levels = c(
"Adults",
"Larvae or juveniles",
"Embryos",
"Mix (before and after hatching)",
"Mix (strictly after hatching)",
"Unclear"
)
))
# Create plot
stream_ls_exposed_temp <- ggplot(data = ls_exposed_stream_temp,
aes(x = Publication_year,
y = proportion,
fill = Life_stage_exposed)) +
geom_stream(type = "proportion", alpha = 0.6) +
geom_stream_label(type = "ridge", aes(label = Life_stage_exposed), size = 7) +
scale_fill_manual(values = palette)+
scale_y_continuous(breaks = seq(0, 1, 0.25),
expand = c(0, 0)) +
scale_x_continuous(
breaks = seq(min(ls_exposed_stream$Publication_year, na.rm = TRUE),
max(ls_exposed_stream$Publication_year, na.rm = TRUE),
by = 2),
expand = c(0, 0)) +
labs(
x = "Publication year",
y = "Proportion of studies",
title = "Life stage exposed") +
custom_theme +
theme(legend.position = "none")
Life stage tested for physiological traits
# Prepare data for stream plot (proportions by year and life stage)
ls_tested_stream_temp <- data_temp %>%
select(Publication_year, Life_stage_tested) %>%
mutate(Life_stage_tested= strsplit(Life_stage_tested, ", ")) %>%
unnest(Life_stage_tested) %>%
group_by(Publication_year, Life_stage_tested) %>%
summarise(n = n(), .groups = "drop") %>%
group_by(Publication_year) %>%
mutate(proportion = n / sum(n)) %>%
ungroup() %>%
mutate(Life_stage_tested = factor(
Life_stage_tested,
levels = c(
"Adults",
"Larvae or juveniles",
"Embryos",
"Unclear"
)
))
# Create plot
stream_ls_tested_temp <- ggplot(data = ls_tested_stream_temp,
aes(x = Publication_year,
y = proportion,
fill = Life_stage_tested)) +
geom_stream(type = "proportion", alpha = 0.6) +
geom_stream_label(type = "ridge", aes(label = Life_stage_tested), size = 7) +
scale_fill_manual(values = palette)+
scale_y_continuous(expand = c(0, 0)) +
scale_x_continuous(
breaks = seq(min(ls_tested_stream$Publication_year, na.rm = TRUE),
max(ls_tested_stream$Publication_year, na.rm = TRUE),
by = 2),
expand = c(0, 0)
) +
labs(
x = "Publication year",
y = "Proportion of studies",
fill = "Life stage tested",
title = "Life stage tested") +
custom_theme +
theme(legend.position = "none")
Combine plots
# Combine plots
stream_plot_temp <- (stream_ls_exposed_temp | stream_ls_tested_temp) +
plot_annotation(tag_levels = "a", tag_suffix = ".") & theme(plot.tag = element_text(size = 35))
stream_plot_temp
Trends across journals
Life stage exposed to the stressor
# Calculate data summary
life_stage_by_journal_exp_temp <- split_and_summarise(data_temp, "Journal")
flextable(life_stage_by_journal_exp_temp) %>%
autofit() %>%
set_caption("Life stages exposed across journals") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Journal | Life stage exposed | n | proportion |
|---|---|---|---|
Conservation Physiology | Unclear | 8 | 0.07766990 |
Conservation Physiology | Mix (strictly after hatching) | 2 | 0.01941748 |
Conservation Physiology | Embryos | 12 | 0.11650485 |
Conservation Physiology | Larvae or juveniles | 43 | 0.41747573 |
Conservation Physiology | Adults | 38 | 0.36893204 |
Journal of Experimental Biology | Unclear | 9 | 0.03272727 |
Journal of Experimental Biology | Mix (strictly after hatching) | 7 | 0.02545455 |
Journal of Experimental Biology | Mix (before and after hatching) | 17 | 0.06181818 |
Journal of Experimental Biology | Embryos | 23 | 0.08363636 |
Journal of Experimental Biology | Larvae or juveniles | 43 | 0.15636364 |
Journal of Experimental Biology | Adults | 176 | 0.64000000 |
Journal of Thermal Biology | Unclear | 27 | 0.05684211 |
Journal of Thermal Biology | Mix (strictly after hatching) | 7 | 0.01473684 |
Journal of Thermal Biology | Mix (before and after hatching) | 26 | 0.05473684 |
Journal of Thermal Biology | Embryos | 53 | 0.11157895 |
Journal of Thermal Biology | Larvae or juveniles | 151 | 0.31789474 |
Journal of Thermal Biology | Adults | 211 | 0.44421053 |
# Overall sample size
overall_journal_exp_temp <- sum(life_stage_by_journal_exp_temp$n)
# Data summary for the plot
plot_journal_exp_temp <- life_stage_by_journal_exp_temp %>%
group_by(Journal) %>%
mutate(n_total = sum(n)) %>%
ungroup() %>%
mutate(
Journal_label = reorder(Journal, n_total),
percentage = n / overall_journal_exp_temp * 100 # each row’s percentage of overall studies
)
# Prepare a summary for the total counts per journal
label_data_exp_temp <- plot_journal_exp_temp %>%
group_by(Journal_label) %>%
summarise(
total_percentage = sum(percentage),
total_count = first(n_total)
) %>%
ungroup() %>%
mutate(
# Only display counts if 15 or greater
label = ifelse(total_count >= 15, paste0("n=", total_count), NA)
)
# Create the plot
journal_plot_exposed_temp <- ggplot(plot_journal_exp_temp, aes(x = Journal_label, y = percentage, fill = `Life stage exposed`)) +
geom_col(alpha = 0.6, width = 0.8, size = 0.2, color = "black") +
# Labels for individual segments (inside the bars), only display if n > 15
geom_text(aes(label = ifelse(n >= 15, n, "")),
position = position_stack(vjust = 0.5),
size = 5,
color = "black") +
scale_fill_manual(values =palette, name = "Life stage exposed") +
scale_x_discrete(name = "Journal") +
scale_y_continuous(
name = "Percentage of studies (%)",
breaks = seq(0, 100, by = 10),
expand = c(0, 1)) +
coord_flip() +
custom_theme
Life stage tested for physiological traits
# Calculate data summary
life_stage_by_journal_temp <- split_and_summarise2(data_temp, "Journal")
flextable(life_stage_by_journal_temp) %>%
autofit() %>%
set_caption("Life stages exposed across journals") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Journal | Life stage tested | n | proportion |
|---|---|---|---|
Conservation Physiology | Unclear | 8 | 0.07476636 |
Conservation Physiology | Embryos | 9 | 0.08411215 |
Conservation Physiology | Larvae or juveniles | 48 | 0.44859813 |
Conservation Physiology | Adults | 42 | 0.39252336 |
Journal of Experimental Biology | Unclear | 10 | 0.03344482 |
Journal of Experimental Biology | Embryos | 19 | 0.06354515 |
Journal of Experimental Biology | Larvae or juveniles | 72 | 0.24080268 |
Journal of Experimental Biology | Adults | 198 | 0.66220736 |
Journal of Thermal Biology | Unclear | 25 | 0.04854369 |
Journal of Thermal Biology | Embryos | 51 | 0.09902913 |
Journal of Thermal Biology | Larvae or juveniles | 188 | 0.36504854 |
Journal of Thermal Biology | Adults | 251 | 0.48737864 |
# Overall sample size
overall_journal_temp <- sum(life_stage_by_journal_temp$n)
# Data summary for the plot
plot_journal_temp <- life_stage_by_journal_temp %>%
group_by(Journal) %>%
mutate(n_total = sum(n)) %>%
ungroup() %>%
mutate(
Journal_label = reorder(Journal, n_total),
percentage = n / overall_journal_temp * 100
)
# Prepare a summary for the total counts per journal
label_data_temp <- plot_journal_temp %>%
group_by(Journal_label) %>%
summarise(
total_percentage = sum(percentage),
total_count = first(n_total)
) %>%
ungroup() %>%
mutate(
# Only display counts if 15 or greater
label = ifelse(total_count >= 15, paste0("n=", total_count), NA)
)
# Create the plot
journal_plot_tested_temp <- ggplot(plot_journal_temp, aes(x = Journal_label, y = percentage, fill = `Life stage tested`)) +
geom_col(alpha = 0.6, width = 0.8, size = 0.2, color = "black") +
# Labels for individual segments (inside the bars), only display if n > 15
geom_text(aes(label = ifelse(n >= 15, n, "")),
position = position_stack(vjust = 0.5),
size = 5,
color = "black") +
scale_fill_manual(values = palette, name = "Life stage assessed") +
scale_x_discrete(name = "Journal") +
scale_y_continuous(
name = "Percentage of studies (%)",
breaks = seq(0, 100, by = 10),
expand = c(0, 1)) +
coord_flip() +
custom_theme
Combine plots
# Combine plots
journal_plot_temp <- (journal_plot_exposed_temp | journal_plot_tested_temp) +
plot_annotation(tag_levels = "a", tag_suffix = ".") & theme(plot.tag = element_text(size = 35))
journal_plot_temp
Combine plots
figure_S2 <- (stream_plot_temp / journal_plot_temp) +
plot_annotation(tag_levels = "a", tag_suffix = ".") & theme(plot.tag = element_text(size = 35))
figure_S2
ggsave(figure_S2, file = "Fig/figure_S2.svg", width=20, height = 15, dpi = 1200)
Figure S3
This figure reproduces the patterns in figure 2, but only keeping studies measuring responses to temperature (i.e., the most common climatic stressor).
Trends across trait categories
Life stage exposed to the stressor
# Calculate data summary
life_stage_by_trait_exp_temp <- split_and_summarise(data_temp, "Trait_category")
flextable(life_stage_by_trait_exp_temp) %>%
autofit() %>%
set_caption("Life stages exposed across trait categories") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Trait_category | Life stage exposed | n | proportion |
|---|---|---|---|
Cardiovascular physiology | Unclear | 4 | 0.05797101 |
Cardiovascular physiology | Mix (before and after hatching) | 3 | 0.04347826 |
Cardiovascular physiology | Embryos | 4 | 0.05797101 |
Cardiovascular physiology | Larvae or juveniles | 8 | 0.11594203 |
Cardiovascular physiology | Adults | 50 | 0.72463768 |
Development | Unclear | 8 | 0.03112840 |
Development | Mix (strictly after hatching) | 6 | 0.02334630 |
Development | Mix (before and after hatching) | 22 | 0.08560311 |
Development | Embryos | 54 | 0.21011673 |
Development | Larvae or juveniles | 109 | 0.42412451 |
Development | Adults | 58 | 0.22568093 |
Energetics and metabolism | Unclear | 16 | 0.04705882 |
Energetics and metabolism | Mix (strictly after hatching) | 8 | 0.02352941 |
Energetics and metabolism | Mix (before and after hatching) | 7 | 0.02058824 |
Energetics and metabolism | Embryos | 20 | 0.05882353 |
Energetics and metabolism | Larvae or juveniles | 100 | 0.29411765 |
Energetics and metabolism | Adults | 189 | 0.55588235 |
Environmental tolerance and preference | Unclear | 33 | 0.06420233 |
Environmental tolerance and preference | Mix (strictly after hatching) | 9 | 0.01750973 |
Environmental tolerance and preference | Mix (before and after hatching) | 23 | 0.04474708 |
Environmental tolerance and preference | Embryos | 52 | 0.10116732 |
Environmental tolerance and preference | Larvae or juveniles | 149 | 0.28988327 |
Environmental tolerance and preference | Adults | 248 | 0.48249027 |
Immune function and stress physiology | Unclear | 8 | 0.05517241 |
Immune function and stress physiology | Mix (strictly after hatching) | 2 | 0.01379310 |
Immune function and stress physiology | Mix (before and after hatching) | 2 | 0.01379310 |
Immune function and stress physiology | Embryos | 11 | 0.07586207 |
Immune function and stress physiology | Larvae or juveniles | 43 | 0.29655172 |
Immune function and stress physiology | Adults | 79 | 0.54482759 |
Osmoregulation | Unclear | 4 | 0.09756098 |
Osmoregulation | Mix (strictly after hatching) | 3 | 0.07317073 |
Osmoregulation | Embryos | 2 | 0.04878049 |
Osmoregulation | Larvae or juveniles | 4 | 0.09756098 |
Osmoregulation | Adults | 28 | 0.68292683 |
Other | Unclear | 1 | 0.20000000 |
Other | Embryos | 2 | 0.40000000 |
Other | Larvae or juveniles | 2 | 0.40000000 |
Reproduction | Unclear | 2 | 0.01612903 |
Reproduction | Mix (strictly after hatching) | 3 | 0.02419355 |
Reproduction | Mix (before and after hatching) | 13 | 0.10483871 |
Reproduction | Embryos | 16 | 0.12903226 |
Reproduction | Larvae or juveniles | 27 | 0.21774194 |
Reproduction | Adults | 63 | 0.50806452 |
# Overall sample size
overall_trait_exp_temp <- sum(life_stage_by_trait_exp_temp$n)
# Data summary for the plot
plot_trait_exp_temp <- life_stage_by_trait_exp_temp %>%
filter(Trait_category != "Other") %>% # Remove "Other" category for clarity
# Rename the trait categories
mutate(Trait_category = recode(Trait_category,
"Environmental tolerance and preference" = "Environmental tolerance/preference",
"Immune function and stress physiology" = "Immune function/stress physiology",
"Energetics and metabolism" = "Energetics/metabolism"
)) %>%
group_by(Trait_category) %>%
mutate(
n_total = sum(n)
) %>%
ungroup() %>%
mutate(
trait_label = reorder(Trait_category, n_total),
percentage = n / overall_trait_exp_temp * 100
)
# Prepare a summary for the total counts per trait
label_data_exp_temp <- plot_trait_exp_temp %>%
group_by(trait_label) %>%
summarise(
total_percentage = sum(percentage),
total_count = first(n_total)
) %>%
ungroup() %>%
mutate(
# Only display counts if 15 or greate
label = ifelse(total_count >= 15, paste0("n=", total_count), NA)
)
# Create the plot
trait_plot_exposed_temp <- ggplot(plot_trait_exp_temp, aes(x = trait_label, y = percentage, fill = `Life stage exposed`)) +
geom_col(alpha = 0.6, width = 0.8, size = 0.2, color = "black") +
# Labels for individual segments (inside the bars); only display if n > 15
geom_text(aes(label = ifelse(n >= 15, n, "")),
position = position_stack(vjust = 0.5),
size = 5,
color = "black") +
scale_fill_manual(values = palette, name = "Life stage exposed") +
scale_x_discrete(name = "Trait category") +
scale_y_continuous(
name = "Percentage of studies (%)",
breaks = seq(0, 100, by = 10),
expand = c(0, 1)) +
coord_flip() +
custom_theme
Life stage tested for physiological traits
# Calculate data summary
life_stage_by_trait_temp <- split_and_summarise2(data_temp, "Trait_category")
flextable(life_stage_by_trait_temp) %>%
autofit() %>%
set_caption("Life stages tested across trait categories") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Trait_category | Life stage tested | n | proportion |
|---|---|---|---|
Cardiovascular physiology | Unclear | 4 | 0.05405405 |
Cardiovascular physiology | Embryos | 5 | 0.06756757 |
Cardiovascular physiology | Larvae or juveniles | 15 | 0.20270270 |
Cardiovascular physiology | Adults | 50 | 0.67567568 |
Development | Unclear | 6 | 0.01960784 |
Development | Embryos | 46 | 0.15032680 |
Development | Larvae or juveniles | 155 | 0.50653595 |
Development | Adults | 99 | 0.32352941 |
Energetics and metabolism | Unclear | 17 | 0.04843305 |
Energetics and metabolism | Embryos | 17 | 0.04843305 |
Energetics and metabolism | Larvae or juveniles | 115 | 0.32763533 |
Energetics and metabolism | Adults | 202 | 0.57549858 |
Environmental tolerance and preference | Unclear | 33 | 0.06000000 |
Environmental tolerance and preference | Embryos | 50 | 0.09090909 |
Environmental tolerance and preference | Larvae or juveniles | 187 | 0.34000000 |
Environmental tolerance and preference | Adults | 280 | 0.50909091 |
Immune function and stress physiology | Unclear | 8 | 0.05369128 |
Immune function and stress physiology | Embryos | 7 | 0.04697987 |
Immune function and stress physiology | Larvae or juveniles | 50 | 0.33557047 |
Immune function and stress physiology | Adults | 84 | 0.56375839 |
Osmoregulation | Unclear | 4 | 0.08510638 |
Osmoregulation | Embryos | 2 | 0.04255319 |
Osmoregulation | Larvae or juveniles | 9 | 0.19148936 |
Osmoregulation | Adults | 32 | 0.68085106 |
Other | Unclear | 1 | 0.25000000 |
Other | Larvae or juveniles | 3 | 0.75000000 |
Reproduction | Unclear | 2 | 0.01298701 |
Reproduction | Embryos | 22 | 0.14285714 |
Reproduction | Larvae or juveniles | 45 | 0.29220779 |
Reproduction | Adults | 85 | 0.55194805 |
# Overall sample size
overall_trait_temp <- sum(life_stage_by_trait_temp$n)
# Data summary for the plot
plot_trait_temp <- life_stage_by_trait_temp %>%
filter(Trait_category != "Other") %>% # Remove "Other" category for clarity
mutate(Trait_category = recode(Trait_category,
"Environmental tolerance and preference" = "Environmental tolerance/preference",
"Immune function and stress physiology" = "Immune function/stress physiology",
"Energetics and metabolism" = "Energetics/metabolism"
)) %>%
mutate(
`Life stage tested` = factor(
`Life stage tested`,
levels = c("Unclear", "Embryos", "Larvae or juveniles", "Adults")
)
) %>%
group_by(Trait_category) %>%
mutate(
n_total = sum(n)
) %>%
ungroup() %>%
mutate(
trait_label = reorder(Trait_category, n_total),
percentage = n / overall_trait_temp * 100
)
# Prepare a summary for the total counts per trait
label_data_temp <- plot_trait_temp %>%
group_by(trait_label) %>%
summarise(
total_percentage = sum(percentage),
total_count = first(n_total)
) %>%
ungroup() %>%
mutate(
# Only display counts if 15 or greater
label = ifelse(total_count >= 15, paste0("n=", total_count), NA)
)
# Create the plot
trait_plot_tested_temp <- ggplot(plot_trait_temp, aes(x = trait_label, y = percentage, fill = `Life stage tested`)) +
geom_col(alpha = 0.6, width = 0.8, size = 0.2, color = "black") +
# Labels for individual segments (inside the bars); only display if n > 15
geom_text(aes(label = ifelse(n >= 15, n, "")),
position = position_stack(vjust = 0.5),
size = 5,
color = "black") +
scale_fill_manual(values = palette, name = "Life stage assessed") +
scale_x_discrete(name = "Trait category") +
scale_y_continuous(
name = "Percentage of studies (%)",
breaks = seq(0, 100, by = 10),
expand = c(0, 1)) +
coord_flip() +
custom_theme
Combine plots
# Combine plots
trait_plot_temp <- (trait_plot_exposed_temp | trait_plot_tested_temp) +
plot_annotation(tag_levels = "a", tag_suffix = ".") & theme(plot.tag = element_text(size = 35))
trait_plot_temp
Trends across taxonomic groups
Life stage exposed to the stressor
# Create data summary
life_stage_by_taxa_exp_temp <- split_and_summarise(data_temp, "Taxonomic_group")
flextable(life_stage_by_taxa_exp_temp) %>%
autofit() %>%
set_caption("Life stages exposed across taxonomic groups") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Taxonomic_group | Life stage exposed | n | proportion |
|---|---|---|---|
Amphibian | Unclear | 3 | 0.05357143 |
Amphibian | Mix (strictly after hatching) | 1 | 0.01785714 |
Amphibian | Mix (before and after hatching) | 2 | 0.03571429 |
Amphibian | Embryos | 7 | 0.12500000 |
Amphibian | Larvae or juveniles | 21 | 0.37500000 |
Amphibian | Adults | 22 | 0.39285714 |
Bird | Unclear | 4 | 0.05194805 |
Bird | Mix (strictly after hatching) | 1 | 0.01298701 |
Bird | Embryos | 18 | 0.23376623 |
Bird | Larvae or juveniles | 15 | 0.19480519 |
Bird | Adults | 39 | 0.50649351 |
Fish | Unclear | 19 | 0.08520179 |
Fish | Mix (strictly after hatching) | 3 | 0.01345291 |
Fish | Mix (before and after hatching) | 6 | 0.02690583 |
Fish | Embryos | 19 | 0.08520179 |
Fish | Larvae or juveniles | 88 | 0.39461883 |
Fish | Adults | 88 | 0.39461883 |
Insect | Unclear | 3 | 0.01298701 |
Insect | Mix (strictly after hatching) | 3 | 0.01298701 |
Insect | Mix (before and after hatching) | 24 | 0.10389610 |
Insect | Embryos | 22 | 0.09523810 |
Insect | Larvae or juveniles | 76 | 0.32900433 |
Insect | Adults | 103 | 0.44588745 |
Mammal | Unclear | 4 | 0.04819277 |
Mammal | Embryos | 1 | 0.01204819 |
Mammal | Larvae or juveniles | 8 | 0.09638554 |
Mammal | Adults | 70 | 0.84337349 |
Other invertebrate | Unclear | 7 | 0.05882353 |
Other invertebrate | Mix (strictly after hatching) | 6 | 0.05042017 |
Other invertebrate | Mix (before and after hatching) | 10 | 0.08403361 |
Other invertebrate | Embryos | 7 | 0.05882353 |
Other invertebrate | Larvae or juveniles | 19 | 0.15966387 |
Other invertebrate | Adults | 70 | 0.58823529 |
Reptile | Unclear | 5 | 0.07246377 |
Reptile | Mix (strictly after hatching) | 2 | 0.02898551 |
Reptile | Mix (before and after hatching) | 1 | 0.01449275 |
Reptile | Embryos | 16 | 0.23188406 |
Reptile | Larvae or juveniles | 11 | 0.15942029 |
Reptile | Adults | 34 | 0.49275362 |
# Overall sample size
overall_taxa_exp_temp <- sum(life_stage_by_taxa_exp_temp$n)
# Data summary for the plot
plot_taxa_exp_temp <- life_stage_by_taxa_exp_temp %>%
group_by(Taxonomic_group) %>%
mutate(
n_total = sum(n)
) %>%
ungroup() %>%
mutate(
Taxa_label = reorder(Taxonomic_group, n_total),
percentage = n / overall_taxa_exp_temp * 100
)
# Prepare a summary for the total counts per taxonomic group
label_data_exp_temp <- plot_taxa_exp_temp %>%
group_by(Taxa_label) %>%
summarise(
total_percentage = sum(percentage),
total_count = first(n_total)
) %>%
ungroup() %>%
mutate(
# Only display counts if 15 or greater
label = ifelse(total_count >= 15, paste0("n=", total_count), NA)
)
# Create the plot
taxa_plot_exposed_temp <- ggplot(plot_taxa_exp_temp, aes(x = Taxa_label, y = percentage, fill = `Life stage exposed`)) +
geom_col(alpha = 0.6, width = 0.8, size = 0.2, color = "black") +
# Labels for individual segments (inside the bars), only display if n > 15
geom_text(aes(label = ifelse(n >= 15, n, "")),
position = position_stack(vjust = 0.5),
size = 5,
color = "black") +
scale_fill_manual(values = palette, name = "Life stage exposed") +
scale_x_discrete(name = "Taxonomic group") +
scale_y_continuous(
name = "Percentage of studies (%)",
breaks = seq(0, 100, by = 10),
expand = c(0, 1)) +
coord_flip() +
custom_theme
Life stage tested for physiological traits
# Create data summary
life_stage_by_taxa_temp <- split_and_summarise2(data_temp, "Taxonomic_group")
flextable(life_stage_by_taxa_temp) %>%
autofit() %>%
set_caption("Life stages tested across taxonomic groups") %>%
bg(bg = "white", part = "all") %>%
color(color = "black", part = "all")
Taxonomic_group | Life stage tested | n | proportion |
|---|---|---|---|
Amphibian | Unclear | 3 | 0.05357143 |
Amphibian | Embryos | 4 | 0.07142857 |
Amphibian | Larvae or juveniles | 24 | 0.42857143 |
Amphibian | Adults | 25 | 0.44642857 |
Bird | Unclear | 4 | 0.04651163 |
Bird | Embryos | 12 | 0.13953488 |
Bird | Larvae or juveniles | 29 | 0.33720930 |
Bird | Adults | 41 | 0.47674419 |
Fish | Unclear | 20 | 0.08620690 |
Fish | Embryos | 18 | 0.07758621 |
Fish | Larvae or juveniles | 100 | 0.43103448 |
Fish | Adults | 94 | 0.40517241 |
Insect | Unclear | 3 | 0.01176471 |
Insect | Embryos | 24 | 0.09411765 |
Insect | Larvae or juveniles | 81 | 0.31764706 |
Insect | Adults | 147 | 0.57647059 |
Mammal | Unclear | 3 | 0.03409091 |
Mammal | Embryos | 1 | 0.01136364 |
Mammal | Larvae or juveniles | 12 | 0.13636364 |
Mammal | Adults | 72 | 0.81818182 |
Other invertebrate | Unclear | 7 | 0.05223881 |
Other invertebrate | Embryos | 10 | 0.07462687 |
Other invertebrate | Larvae or juveniles | 36 | 0.26865672 |
Other invertebrate | Adults | 81 | 0.60447761 |
Reptile | Unclear | 4 | 0.05333333 |
Reptile | Embryos | 10 | 0.13333333 |
Reptile | Larvae or juveniles | 27 | 0.36000000 |
Reptile | Adults | 34 | 0.45333333 |
# Overall sample size
overall_taxa_temp <- sum(life_stage_by_taxa_temp$n)
# Data summary for the plot
plot_taxa_temp <- life_stage_by_taxa_temp %>%
group_by(Taxonomic_group) %>%
mutate(
n_total = sum(n)
) %>%
ungroup() %>%
mutate(
Taxa_label = reorder(Taxonomic_group, n_total),
percentage = n / overall_taxa_temp * 100
)
# Prepare a summary for the total counts per taxonomic group
label_data_temp <- plot_taxa_temp %>%
group_by(Taxa_label) %>%
summarise(
total_percentage = sum(percentage),
total_count = first(n_total)
) %>%
ungroup() %>%
mutate(
# Only display counts if 15 or greater
label = ifelse(total_count >= 15, paste0("n=", total_count), NA)
)
# Create the plot
taxa_plot_tested_temp <- ggplot(plot_taxa_temp, aes(x = Taxa_label, y = percentage, fill = `Life stage tested`)) +
geom_col(alpha = 0.6, width = 0.8, size = 0.2, color = "black") +
# Labels for individual segments (inside the bars), only display if n > 15
geom_text(aes(label = ifelse(n >= 15, n, "")),
position = position_stack(vjust = 0.5),
size = 5,
color = "black") +
scale_fill_manual(values = palette, name = "Life stage assessed") +
scale_x_discrete(name = "Taxonomic group") +
scale_y_continuous(
name = "Percentage of studies (%)",
breaks = seq(0, 100, by = 10),
expand = c(0, 1)) +
coord_flip() +
custom_theme
Combine plots
# Combine plots
taxa_plot_temp <- (taxa_plot_exposed_temp | taxa_plot_tested_temp) +
plot_annotation(tag_levels = "a", tag_suffix = ".") & theme(plot.tag = element_text(size = 35))
taxa_plot_temp
Combine plots
figure_S3 <- (trait_plot_temp / taxa_plot_temp) +
plot_annotation(tag_levels = "a", tag_suffix = ".") & theme(plot.tag = element_text(size = 35))
figure_S3
ggsave(figure_S3, file = "Fig/figure_S3.svg", width=35, height = 20, dpi = 1200, limitsize = FALSE)
Figure S4
This figure reproduces the patterns in figure 3, but only keeping studies measuring responses to temperature (i.e., the most common climatic stressor).
categories <- c("Adults", "Larvae or juveniles", "Embryos")
# Parse life stages
data_temp <- data_temp %>%
mutate(lifestages = strsplit(Life_stage_tested, ",\\s*") %>% map(trimws))
# Dummy list to store matrix
dummy_list_temp <- data_temp %>%
mutate(dummy = map(lifestages, ~ as.integer(categories %in% .x))) %>%
pull(dummy) %>%
map(~ setNames(.x, categories))
# Add names to each dummy vector
dummy_list_temp <- map(dummy_list_temp, ~ setNames(.x, categories))
# Sum the outer products of the dummy vectors to form a co-occurrence matrix.
# Each record contributes an outer product: if a record has both "Adults" and "Embryos",
# then outer(vec, vec) returns a matrix with a 1 in that cell.
NetMatrix_lifestage_temp <- Reduce("+", lapply(dummy_list_temp, function(vec) outer(vec, vec)))
# Separate cases where there is a single vs. multiple life stages
exclusive_counts_temp <- sapply(categories, function(cat) {
sum(lengths(data_temp$lifestages) == 1 & vapply(data_temp$lifestages, function(x) x[1] == cat, logical(1)))
})
diag(NetMatrix_lifestage_temp) <- exclusive_counts_temp # replace diagonal
NetMatrix_lifestage_temp[lower.tri(NetMatrix_lifestage_temp)] <- 0 # Remove duplicated information
# Check the matrix
print(NetMatrix_lifestage_temp)
## Adults Larvae or juveniles Embryos
## Adults 387 96 28
## Larvae or juveniles 0 180 52
## Embryos 0 0 19
# Create the chord diagram
png(file ="Fig/figure_S4.png", pointsize = 4.5, res = 1000, width = 10, height = 10, unit = "cm",)
circos.par(gap.after = c(2,2,2)) # Adjust space between categories
figure_S4 <- chordDiagram(NetMatrix_lifestage_temp,
annotationTrack = "grid",
preAllocateTracks = 1,
grid.col = palette,
self.link = 1) # Don't duplicate data
# Remove the sector names (labels) and just display the axis (numbers/ticks)
circos.trackPlotRegion(track.index = 1, panel.fun = function(x, y) {
xlim <- get.cell.meta.data("xlim")
ylim <- get.cell.meta.data("ylim")
sector.name <- get.cell.meta.data("sector.index")
circos.axis(h = "top", labels.cex = 0.75, major.tick.length = 0.2,
sector.index = sector.name, track.index = 2)
}, bg.border = NA)
figure_S4
## rn cn value1 value2 o1 o2 x1 x2 col
## 1 Adults Adults 387 387 3 0 511 511 #1B9E777F
## 2 Larvae or juveniles Adults 0 0 1 5 0 511 #7570B37F
## 3 Embryos Adults 0 0 2 4 0 511 #E6AB027F
## 4 Adults Larvae or juveniles 96 96 2 4 124 328 #1B9E777F
## 5 Larvae or juveniles Larvae or juveniles 180 180 3 0 232 232 #7570B37F
## 6 Embryos Larvae or juveniles 0 0 1 5 0 328 #E6AB027F
## 7 Adults Embryos 28 28 1 5 28 99 #1B9E777F
## 8 Larvae or juveniles Embryos 52 52 2 4 52 71 #7570B37F
## 9 Embryos Embryos 19 19 3 0 19 19 #E6AB027F
dev.off()
## png
## 2
Package versions
sessionInfo()
## R version 4.4.2 (2024-10-31 ucrt)
## Platform: x86_64-w64-mingw32/x64
## Running under: Windows 11 x64 (build 26100)
##
## Matrix products: default
##
##
## locale:
## [1] LC_COLLATE=English_Australia.utf8 LC_CTYPE=English_Australia.utf8
## [3] LC_MONETARY=English_Australia.utf8 LC_NUMERIC=C
## [5] LC_TIME=English_Australia.utf8
##
## time zone: Europe/Berlin
## tzcode source: internal
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] patchwork_1.3.0 circlize_0.4.16 bib2df_1.1.2.0 bibliometrix_4.3.4
## [5] flextable_0.9.7 ggstream_0.1.0 lubridate_1.9.4 forcats_1.0.0
## [9] stringr_1.5.1 dplyr_1.1.4 purrr_1.0.2 readr_2.1.5
## [13] tidyr_1.3.1 tibble_3.2.1 ggplot2_3.5.1 tidyverse_2.0.0
##
## loaded via a namespace (and not attached):
## [1] readxl_1.4.3 rlang_1.1.4 magrittr_2.0.3
## [4] tidytext_0.4.2 compiler_4.4.2 openalexR_1.4.0
## [7] systemfonts_1.2.2 vctrs_0.6.5 crayon_1.5.3
## [10] pkgconfig_2.0.3 shape_1.4.6.1 fastmap_1.2.0
## [13] labeling_0.4.3 rmdformats_1.0.4 ca_0.71.1
## [16] promises_1.3.2 rmarkdown_2.29 tzdb_0.4.0
## [19] ragg_1.3.3 bit_4.6.0 xfun_0.52
## [22] cachem_1.1.0 jsonlite_1.8.9 SnowballC_0.7.1
## [25] later_1.4.1 uuid_1.2-1 parallel_4.4.2
## [28] R6_2.6.1 bslib_0.9.0 stringi_1.8.4
## [31] jquerylib_0.1.4 cellranger_1.1.0 Rcpp_1.0.14
## [34] bookdown_0.42 knitr_1.50 httpuv_1.6.15
## [37] rentrez_1.2.3 Matrix_1.7-1 igraph_2.1.4
## [40] timechange_0.3.0 tidyselect_1.2.1 rstudioapi_0.17.1
## [43] stringdist_0.9.15 pubmedR_0.0.3 yaml_2.3.10
## [46] codetools_0.2-20 humaniformat_0.6.0 lattice_0.22-6
## [49] plyr_1.8.9 shiny_1.10.0 withr_3.0.2
## [52] askpass_1.2.1 evaluate_1.0.3 zip_2.3.2
## [55] xml2_1.3.8 pillar_1.10.2 janeaustenr_1.0.0
## [58] DT_0.33 plotly_4.10.4 generics_0.1.3
## [61] vroom_1.6.5 hms_1.1.3 munsell_0.5.1
## [64] scales_1.3.0 xtable_1.8-4 glue_1.8.0
## [67] gdtools_0.4.1 lazyeval_0.2.2 tools_4.4.2
## [70] data.table_1.17.0 tokenizers_0.3.0 openxlsx_4.2.8
## [73] visNetwork_2.1.2 XML_3.99-0.18 grid_4.4.2
## [76] rscopus_0.6.6 colorspace_2.1-1 dimensionsR_0.0.3
## [79] bibliometrixData_0.3.0 cli_3.6.3 textshaping_1.0.0
## [82] officer_0.6.8 fontBitstreamVera_0.1.1 viridisLite_0.4.2
## [85] svglite_2.1.3 gtable_0.3.6 sass_0.4.9
## [88] digest_0.6.37 fontquiver_0.2.1 ggrepel_0.9.6
## [91] htmlwidgets_1.6.4 farver_2.1.2 htmltools_0.5.8.1
## [94] lifecycle_1.0.4 httr_1.4.7 GlobalOptions_0.1.2
## [97] mime_0.13 bit64_4.6.0-1 fontLiberation_0.1.0
## [100] openssl_2.3.2